Skip to content

Commit

Permalink
Fix for #243 I had forgotten a quotation mark, whoops. Also fix for #270
Browse files Browse the repository at this point in the history
 There just wasn't anything even trying to supply site visit information to the request.
Elijahwalkerwest committed Mar 23, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 5ef6447 commit 6280df8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/sensordatainterface/views/edit_views.py
Original file line number Diff line number Diff line change
@@ -1252,7 +1252,7 @@ def edit_retrieval(request, deployment_id=None, retrieval_id=None):

if request.method == 'POST':
updating = request.POST['action'] == 'update'
if request.POST.get(deployment_id):
if request.POST.get('deployment_id'):
deployment_action = Action.objects.get(pk=request.POST.get('deployment_id'))
else:
deployment_action = Action.objects.get(pk=request.POST.get('deploymentaction'))
@@ -1341,7 +1341,12 @@ def edit_retrieval(request, deployment_id=None, retrieval_id=None):

elif deployment_id:
deployment_action = Action.objects.get(pk=deployment_id)
site_visit_form = SiteVisitChoiceForm()
parent_action_id = RelatedAction.objects.get(
relationshiptypecv=child_relationship,
actionid=deployment_id
)
site_visit = Action.objects.get(pk=parent_action_id.relatedactionid.actionid)
site_visit_form = SiteVisitChoiceForm(instance=site_visit)

retrieval_form = ActionForm(
initial={

0 comments on commit 6280df8

Please sign in to comment.