Fix #1950: record_event fails for api events

This commit is contained in:
Arik Fraimovich 2017-09-27 18:04:21 +03:00
parent 50eb9a86c9
commit 18d9b2eec9

View File

@ -44,7 +44,7 @@ class BaseResource(Resource):
def record_event(org, user, options):
if isinstance(user, ApiUser):
if user.is_api_user():
options.update({
'api_key': user.name,
'org_id': org.id
@ -52,6 +52,7 @@ def record_event(org, user, options):
else:
options.update({
'user_id': user.id,
'user_name': user.name,
'org_id': org.id
})