Skip to content
Snippets Groups Projects
Commit ea62d52a authored by Nico Vermaas's avatar Nico Vermaas
Browse files

add quality field to quality details view, and make sure to save the tasks after changing quality

parent 0d4d05de
No related branches found
No related tags found
1 merge request!265SDC 791 validation per SAS_ID
Pipeline #40165 passed
......@@ -117,6 +117,7 @@ def convert_quality_to_html(task):
results += "<tr><td><b>SAS_ID</b></td><td>" + str(task.sas_id) + "</td></tr>"
results += "<tr><td><b>Project</b></td><td>" + str(task.project) + "</td></tr>"
results += "<tr><td><b>ATDB Filter</b></td><td>" + str(task.filter) + "</td></tr>"
results += "<tr><td><b>Quality</b></td><td>" + str(task.quality) + "</td></tr>"
results += "<tr><td><b>QA uv-coverage</b></td><td>" + str(task.quality_json['uv-coverage']) + "</td></tr>"
results += "<tr><td><b>QA sensitivity</b></td><td>" + str(task.quality_json['sensitivity']) + "</td></tr>"
results += "<tr><td><b>QA observing-conditions</b></td><td>" + str(task.quality_json['observing-conditions']) + "</td></tr>"
......
......@@ -957,19 +957,14 @@ def TaskValidate(request, pk, quality, new_status, page=0):
model = Task
task = Task.objects.get(pk=pk)
# find all tasks with the same SAS_ID, and set this quality to all of the
# find all tasks with the same SAS_ID, and set this quality to all of them
sas_id = task.sas_id
tasks = Task.objects.filter(sas_id=sas_id)
for task in tasks:
if task.status == 'stored':
task.quality = quality
task.new_status = new_status
# task.save()
#task.new_status = new_status
#task.quality = quality
#task.save()
task.save()
if page == 0:
# redirect to details screen
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment