Skip to content

Commit

Permalink
fix: event logger when current user is None (pinterest#1153)
Browse files Browse the repository at this point in the history
  • Loading branch information
jczhong84 authored and rohan-sh1 committed Apr 11, 2023
1 parent bf2f66b commit e23ce1c
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 e23ce1c

Please sign in to comment.