Skip to content

Commit

Permalink
fix: fix status_info method in TicketAdmin
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Jan 15, 2024
1 parent 2f84211 commit 796948f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/sspanel/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ class TicketAdmin(admin.ModelAdmin):
def status_info(self, instance):
res = instance.status_with_message_count
last_reply = instance.messages.last()
if not last_reply.user.is_staff:
if not last_reply:
res += " | 未读"
elif last_reply.user.is_staff:
res += " | 未读"
return res

Expand Down

0 comments on commit 796948f

Please sign in to comment.