only use the user if authenticated

This commit is contained in:
Matthias 2022-05-18 23:33:04 +02:00
parent 51cd038f04
commit c0ef12f270
No known key found for this signature in database
GPG Key ID: AB6D0E6C4CB65093

View File

@ -83,7 +83,7 @@ def render_date(context, date_object):
user = context.get('user', None)
if user:
if user and user.is_authenticated:
# User is specified - look for their date display preference
user_date_format = InvenTreeUserSetting.get_setting('DATE_DISPLAY_FORMAT', user=user)
else: