Slightly more defensive programming -- we don't expose this in the UI unless there *is* a trans.user, but we might as well be careful here.

This commit is contained in:
Dannon Baker
2017-02-14 15:10:02 -05:00
parent 43d80a0b60
commit 966d578b47
@@ -625,7 +625,8 @@ class User( BaseUIController, UsesFormDefinitionsMixin, CreatesUsersMixin, Creat
else:
refresh_frames = [ 'masthead', 'history' ]
# Recalculate user disk usage.
trans.user.calculate_disk_usage()
if trans.user:
trans.user.calculate_disk_usage()
# Since logging an event requires a session, we'll log prior to ending the session
trans.log_event( "User logged out" )
else: