mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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…
Reference in New Issue
Block a user