From edb1dbfb099d61b5906883a77d14968502febafc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Victor=20L=C3=B6fgren?= <viclo211@student.liu.se>
Date: Fri, 21 May 2021 22:10:46 +0200
Subject: [PATCH] Minor edits in slide and questions

---
 server/app/apis/questions.py | 2 +-
 server/app/apis/slides.py    | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/server/app/apis/questions.py b/server/app/apis/questions.py
index 29785906..60ed2100 100644
--- a/server/app/apis/questions.py
+++ b/server/app/apis/questions.py
@@ -80,7 +80,7 @@ class QuestionById(MethodView):
         return dbc.edit.default(dbc.get.question(competition_id, slide_id, question_id), **args)
 
     @protect_route(allowed_roles=["*"])
-    @blp.response(http_codes.NO_CONTENT, QuestionSchema)
+    @blp.response(http_codes.NO_CONTENT, None)
     @blp.alt_response(http_codes.NOT_FOUND, None, description="Could not find question")
     @blp.alt_response(http_codes.CONFLICT, None, description="Could not delete question")
     def delete(self, competition_id, slide_id, question_id):
diff --git a/server/app/apis/slides.py b/server/app/apis/slides.py
index 5c2d7ad3..d394bddf 100644
--- a/server/app/apis/slides.py
+++ b/server/app/apis/slides.py
@@ -26,10 +26,9 @@ class SlideEditArgsSchema(BaseSchema):
     class Meta(BaseSchema.Meta):
         model = models.Slide
 
-    order = ma.auto_field(required=False)
     title = ma.auto_field(required=False)
     timer = ma.auto_field(required=False)
-    order = ma.auto_field(required=False)
+    order = ma.auto_field(required=False, missing=None)
     background_image_id = ma.auto_field(required=False)
 
 
-- 
GitLab