Skip to content

Commit

Permalink
Fix the status exception when no user ever logged in to the application
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed Apr 24, 2024
1 parent 69c2750 commit 90c37bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/core/management/commands/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def handle(self, *args, **kwargs):
x["last_login"] for x in User.objects.all().values("last_login")
)
self.stdout.write(
f"created_at={created_at.strftime('%Y-%m-%dT%H:%M')} last_login={last_login.strftime('%Y-%m-%dT%H:%M')} "
f"created_at={created_at.strftime('%Y-%m-%dT%H:%M')} last_login={last_login.strftime('%Y-%m-%dT%H:%M') if last_login else last_login} "
+ f"users={nb_users} first_logins={nb_first_login} libraries={nb_libraries} "
+ f"domains={nb_domains} projects={nb_projects} assets={nb_assets} "
+ f"threats={nb_threats} functions={nb_functions} measures={nb_measures} "
Expand Down

0 comments on commit 90c37bf

Please sign in to comment.