exc-tracking: fixed send-email bug when called from a source not attached to user session.
This commit is contained in:
parent
faa932a3a1
commit
65ea5624f2
1 changed files with 1 additions and 1 deletions
|
|
@ -131,7 +131,7 @@ def send_exc_email(request, exc_id, exc_type_name):
|
|||
|
||||
# NOTE(marcink): needed for email template rendering
|
||||
user_id = None
|
||||
if request:
|
||||
if hasattr(request, 'user'):
|
||||
user_id = request.user.user_id
|
||||
attach_context_attributes(TemplateArgs(), request, user_id=user_id, is_api=True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue