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

bugfix path_to_lta

parent 8eb0ae9d
No related branches found
No related tags found
1 merge request!337Upgrade to django 5
Pipeline #69353 passed
...@@ -303,6 +303,16 @@ class Task(models.Model): ...@@ -303,6 +303,16 @@ class Task(models.Model):
except: except:
return None return None
@property
def path_to_lta(self):
"""
return the 'path_to_lta' of this task (or None if that fails)
"""
try:
return self.archive['path_to_lta']
except:
return None
@property @property
def sasid_path_to_lta(self): def sasid_path_to_lta(self):
""" """
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<td>{{ task.sasid_ingested_fraction.completion }}%</td> <td>{{ task.sasid_ingested_fraction.completion }}%</td>
<td> <td>
{% if task.sas_id_has_archived != None %} {% if task.sas_id_has_archived != None %}
<a href={{ task.path_to_lta }} target="_blank"> <a href={{ task.sasid_path_to_lta }} target="_blank">
<img src="{% static 'taskdatabase/ldvlogo_small.png' %}" height="20" alt="link to LTA"> <img src="{% static 'taskdatabase/ldvlogo_small.png' %}" height="20" alt="link to LTA">
{{ task.sas_id_has_archived }} {{ task.sas_id_has_archived }}
</a>&nbsp; </a>&nbsp;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment