Closed toconnell closed 6 years ago
It's obviously an un-handled condition that comes up when trying to record some kind of event...
This doesn't address root cause, but we're going to try it for now, just to squelch the emails:
diff --git a/v2/api/Models.py b/v2/api/Models.py
index f5dc306..0bb7b26 100644
--- a/v2/api/Models.py
+++ b/v2/api/Models.py
@@ -989,7 +989,7 @@ class UserAsset(object):
# finally, if we had a requester, now that we've settled on a message
# text, update the requester's latest action with it
if 'created_by' is not None:
- if request:
+ if request and hasattr(request, 'User'):
ua_string = str(ua_parse(request.user_agent.string))
request.User.set_latest_action(d['event'], ua_string)