Skip to content

Commit

Permalink
fix: event logger when current user is None (#1153)
Browse files Browse the repository at this point in the history
  • Loading branch information
jczhong84 authored Feb 9, 2023
1 parent efdbd7b commit bb96eaf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion querybook/server/lib/event_logger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ def __init__(self):

def log(self, event_type: EventType, event_data: dict, timestamp: int = None):
try:
# default uid 0 if we cant get the current user
uid = current_user.id if current_user else 0
self.logger.log(
uid=current_user.id,
uid=uid,
event_type=event_type,
event_data=event_data,
timestamp=timestamp,
Expand Down

0 comments on commit bb96eaf

Please sign in to comment.