fix: resolve Django Admin 500 error on scheduled tasks list
This commit is contained in:
parent
bec7153b7a
commit
9806175619
1 changed files with 4 additions and 8 deletions
|
|
@ -331,12 +331,8 @@ StreetUp - Système de tâches planifiées
|
|||
def is_active_display(self, obj):
|
||||
"""Affiche le statut avec une icône."""
|
||||
if obj.is_active:
|
||||
return format_html(
|
||||
'<span style="color: green;">✓ Active</span>'
|
||||
)
|
||||
return format_html(
|
||||
'<span style="color: red;">✗ Inactive</span>'
|
||||
)
|
||||
return mark_safe('<span style="color: green;">✓ Active</span>')
|
||||
return mark_safe('<span style="color: red;">✗ Inactive</span>')
|
||||
is_active_display.short_description = "Statut"
|
||||
|
||||
def last_run_display(self, obj):
|
||||
|
|
@ -580,8 +576,8 @@ class CommandExecutionLogAdmin(admin.ModelAdmin):
|
|||
def email_sent_display(self, obj):
|
||||
"""Affiche si l'email a été envoyé."""
|
||||
if obj.email_sent:
|
||||
return format_html('<span style="color: green;">✓</span>')
|
||||
return format_html('<span style="color: gray;">-</span>')
|
||||
return mark_safe('<span style="color: green;">✓</span>')
|
||||
return mark_safe('<span style="color: gray;">-</span>')
|
||||
email_sent_display.short_description = "Email"
|
||||
|
||||
def output_formatted(self, obj):
|
||||
|
|
|
|||
Loading…
Reference in a new issue