This commit is contained in:
parent
d539472905
commit
70c473dc76
@ -16,7 +16,8 @@ class MealBaseResource(Resource):
|
||||
body = request.get_json()
|
||||
|
||||
try:
|
||||
self.mealschema.load(body, session=db.session)
|
||||
loadedobj = self.mealschema.load(body)
|
||||
db.session.add(loadedobj)
|
||||
db.session.commit()
|
||||
return '', 204
|
||||
except ValidationError as error:
|
||||
|
Loading…
Reference in New Issue
Block a user