Unverified Commit 2340617e authored by Johannes Tomren Røsvik's avatar Johannes Tomren Røsvik
Browse files

Collapsible "if" statements should be merged

parent 81cc330d
Pipeline #79919 passed with stage
in 1 minute and 35 seconds
......@@ -224,8 +224,8 @@ def task_view(request, project_id, task_id):
return redirect('/user/login')
if request.method == 'POST' and 'delivery' in request.POST:
if accepted_task_offer and accepted_task_offer.offerer == user.profile:
if (request.method == 'POST' and 'delivery' in request.POST and
accepted_task_offer and accepted_task_offer.offerer == user.profile):
deliver_form = DeliveryForm(request.POST, request.FILES)
if deliver_form.is_valid():
delivery = deliver_form.save(commit=False)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment