Skip to content

Commit e3a11c7

Browse files
fix: order logs rendering
1 parent 0f8eb73 commit e3a11c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

api/admin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from django.contrib import admin, messages
44
from django.contrib.auth.admin import UserAdmin
55
from django.contrib.auth.models import Group, User
6-
from django.utils.html import format_html
6+
from django.utils.html import mark_safe
77
from django_admin_relation_links import AdminChangeLinksMixin
88
from rest_framework.authtoken.admin import TokenAdmin
99
from rest_framework.authtoken.models import TokenProxy
@@ -131,10 +131,10 @@ class OrderAdmin(AdminChangeLinksMixin, admin.ModelAdmin):
131131

132132
def _logs(self, obj):
133133
if not obj.logs:
134-
return format_html("<b>No logs were recorded</b>")
134+
return mark_safe("<b>No logs were recorded</b>")
135135
with_hyperlinks = objects_to_hyperlinks(obj.logs)
136136
try:
137-
html_logs = format_html(
137+
html_logs = mark_safe(
138138
f'<table style="width: 100%">{with_hyperlinks}</table>'
139139
)
140140
except Exception as e:

0 commit comments

Comments
 (0)