mirror of
https://github.com/valitydev/redash.git
synced 2024-11-08 09:53:59 +00:00
Fix #1950: record_event fails for api events
This commit is contained in:
parent
50eb9a86c9
commit
18d9b2eec9
@ -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
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user