Skip to content

Commit

Permalink
- Remove RPM links
Browse files Browse the repository at this point in the history
  • Loading branch information
elipe17 committed Aug 12, 2024
1 parent 9591324 commit fbc3e3b
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tdrs-backend/tdpservice/data_files/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,6 @@ def error_report_link(self, obj):

error_report_link.allow_tags = True

def rpm_links(self, obj):
"""Generate a list of links to ReparseMeta models this file is associated with."""
rpm_list = "<ul>"
# Only show the 5 most recent reparse events the file has been associated with.
latest_meta = obj.reparse_meta_models.all().order_by('-id')[:5]
if len(latest_meta) > 0:
for rpm in latest_meta:
url = f'{DOMAIN}/admin/search_indexes/reparsemeta/?id=' + str(rpm.id)
rpm_list += f"<li><a href={url}>RPM {rpm.id}</a></li>"
else:
rpm_list += "<li>None</li>"
rpm_list += "</ul>"
return format_html(rpm_list)

def data_file_summary(self, obj):
"""Return the data file summary."""
df = DataFileSummary.objects.get(datafile=obj)
Expand All @@ -99,7 +85,6 @@ def data_file_summary(self, obj):
'version',
'data_file_summary',
'error_report_link',
'rpm_links'
]

list_filter = [
Expand Down

0 comments on commit fbc3e3b

Please sign in to comment.