From 70c473dc7687a528e55f2e9e8d2a7ca30015c49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sun, 13 Feb 2022 21:54:43 +0100 Subject: [PATCH] asd --- mealapi/resources/mealresource.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mealapi/resources/mealresource.py b/mealapi/resources/mealresource.py index 1918818..e020b8a 100644 --- a/mealapi/resources/mealresource.py +++ b/mealapi/resources/mealresource.py @@ -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: