Skip to content

Commit

Permalink
Fix for #269, as well as a fix for a problem where the add results bu…
Browse files Browse the repository at this point in the history
…tton wasn't appearing for Updating Deployment actions.
  • Loading branch information
Elijahwalkerwest committed Mar 29, 2018
1 parent fe440e7 commit 0179d1c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/sensordatainterface/templates/base-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ <h1 class="col-xs-12 col-sm-12 col-md-12">{{ action|capfirst }}
{{ curr_result.as_table }}
</tbody>
{% endfor %}
<tbody class='add-result-btn'><tr><td></td><td><a class='add-result-btn btn btn-default col-xs-12 col-sm-12' onclick='javascript:addResultForm(this)'>+ Add Result</a></td></tr></tbody>
{% endif %}

<tbody>
Expand Down
9 changes: 0 additions & 9 deletions src/sensordatainterface/views/api_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,6 @@ def get_equipment_output_variables(request):
)











def get_action_site(request):
if request.method == 'POST':
action_id = request.POST.get('action_id')
Expand Down
4 changes: 3 additions & 1 deletion src/sensordatainterface/views/edit_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ def get_forms_from_request(request, action_id=False):
'calibrationstandardnumber': calibration_standard_count,
'maintenancecode': request.POST.getlist('maintenancecode')[i - 1],
'maintenancereason': request.POST.getlist('maintenancereason')[i - 1],
'instrumentoutputvariable': output_variables[0],
'instrumentoutputvariable': request.POST.getlist('instrumentoutputvariable'),
'calibrationcheckvalue': request.POST.getlist('calibrationcheckvalue')[i - 1],
'calibrationequation': request.POST.getlist('calibrationequation')[i - 1],
'deploymentaction': request.POST.getlist('deploymentaction')[i - 1],
Expand Down Expand Up @@ -1260,6 +1260,8 @@ def edit_retrieval(request, deployment_id=None, retrieval_id=None):
deployment_action = Action.objects.get(pk=request.POST.get('deployment_id'))
else:
deployment_action = Action.objects.get(pk=request.POST.get('deploymentaction'))
if 'equipmentused' not in request.POST:
request.POST['equipmentused'] = ''

if updating:
site_visit = Action.objects.get(pk=request.POST['actionid'])
Expand Down

0 comments on commit 0179d1c

Please sign in to comment.