forms: check user exists when warning for recently changed formdefs
This commit is contained in:
parent
a84c620399
commit
cd6f3150c5
|
@ -257,7 +257,7 @@ class FormDefPage(Directory):
|
|||
if self.formdef.last_modification_time:
|
||||
warning_class = ''
|
||||
if (time.time() - time.mktime(self.formdef.last_modification_time)) < 600:
|
||||
if get_request().user.id != self.formdef.last_modification_user_id:
|
||||
if get_request().user and get_request().user.id != self.formdef.last_modification_user_id:
|
||||
warning_class = 'recent'
|
||||
'<p class="last-modification %s">' % warning_class
|
||||
_('Last Modification:')
|
||||
|
|
Loading…
Reference in New Issue