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

bugfix: show SAS_ID (output)

parent 960f3725
Branches
No related tags found
1 merge request!334updates after demo to SDCO
Pipeline #68920 passed
......@@ -280,16 +280,38 @@ class Task(models.Model):
@property
def sas_id_archived(self):
"""
check if this task already has an output SAS_ID at the LTA
"""
try:
return self.archive['sas_id_archived']
except:
return None
@property
def sas_id_has_archived(self):
"""
check if any task belonging to this sas_id already has an output SAS_ID at the LTA
"""
try:
for task in Task.objects.filter(sas_id=self.sas_id):
if task.archive['sas_id_archived']:
return task.archive['sas_id_archived']
except:
return None
@property
def path_to_lta(self):
"""
check if any task belonging to this sas_id already has a 'path_to_lta' setting
"""
try:
return self.archive['path_to_lta']
for task in Task.objects.filter(sas_id=self.sas_id):
if task.archive['path_to_lta']:
try:
return task.archive['path_to_lta']
except:
pass
except:
return None
......
......@@ -31,7 +31,7 @@
{% include 'taskdatabase/pagination.html' %}
</div>
</div>
<p class="footer"> Version 12 Jan 2024
<p class="footer"> Version 15 Jan 2024
</div>
{% include 'taskdatabase/refresh.html' %}
......
......@@ -27,10 +27,10 @@
<td>{{ task.sasid_ingested_fraction.completion }}%</td>
<td>
{% if task.sas_id_archived != None %}
{% if task.sas_id_has_archived != None %}
<a href={{ task.path_to_lta }} target="_blank">
<img src="{% static 'taskdatabase/ldvlogo_small.png' %}" height="20" alt="link to LTA">
{{ task.sas_id_archived }}
{{ task.sas_id_has_archived }}
</a>&nbsp;
{% else %}
-
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment