use marshmallow to persist memes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4150471b75
commit
ac459031c7
@ -16,9 +16,7 @@ class MealBaseResource(Resource):
|
||||
body = request.get_json()
|
||||
|
||||
try:
|
||||
mealobj = self.mealschema.load(body)
|
||||
db.session.add(mealobj.data)
|
||||
db.session.commit()
|
||||
self.mealschema.load(body, session=db.session)
|
||||
return '', 204
|
||||
except ValidationError as error:
|
||||
abort(406, error.messages)
|
||||
|
Loading…
Reference in New Issue
Block a user