mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 21:16:46 +00:00
only use the user if authenticated
This commit is contained in:
parent
51cd038f04
commit
c0ef12f270
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user