Skip to content

Commit

Permalink
EGCETSII#13-style: Format administration views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pedalopon committed Jan 4, 2022
1 parent 72bffe7 commit 0191885
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions decide/administration/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get(self, request):

def post(self, request):
voting_seria = AdminVotingSerializer(data=request.data)
is_valid(voting_seria.is_valid(),voting_seria.errors)
is_valid(voting_seria.is_valid(), voting_seria.errors)
auth_url = request.data.get("auth")
id_users = request.data.get("census")
auth, _ = Auth.objects.get_or_create(url=auth_url,
Expand Down Expand Up @@ -132,7 +132,7 @@ def put(self, request, voting_id):
voting.question.desc = question_request["desc"]
options = QuestionOption.objects.all().filter(question__pk=voting.question.id)
options_request = question_request.get("options")
tam = max(len(options),len(options_request))
tam = max(len(options), len(options_request))
for i in range(0, tam):
if i < len(options) and i < len(options_request):
option = options[i]
Expand Down Expand Up @@ -167,7 +167,7 @@ def get(self, request):

def post(self, request):
question = AdminQuestionSerializer(data=request.data)
is_valid(question.is_valid(),question.errors)
is_valid(question.is_valid(), question.errors)
question.save()
return Response({}, status=HTTP_200_OK)

Expand Down

0 comments on commit 0191885

Please sign in to comment.