mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-31 02:21:35 +00:00
Fix pretty logs admin for orders with no logs recorded
This commit is contained in:
parent
13806b8183
commit
4e7963c90d
@ -129,6 +129,8 @@ class OrderAdmin(AdminChangeLinksMixin, admin.ModelAdmin):
|
||||
readonly_fields = ("reference", "_logs")
|
||||
|
||||
def _logs(self, obj):
|
||||
if not obj.logs:
|
||||
return format_html("<b>No logs were recorded</b>")
|
||||
with_hyperlinks = objects_to_hyperlinks(obj.logs)
|
||||
return format_html(f'<table style="width: 100%">{with_hyperlinks}</table>')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user