landryb commented on PR #33025: URL: https://github.com/apache/superset/pull/33025#issuecomment-3224217240
@rusackas @dpgaspar what do you think about the following instead ? i can do a PR with that. ``` --- i/superset/utils/log.py +++ w/superset/utils/log.py @@ -196,7 +196,7 @@ class AbstractEventLogger(ABC): if user_id is None and has_request_context(): try: actual_user = g.get("user", None) - if actual_user is not None: + if actual_user is not None and not actual_user.is_anonymous: db.session.add(actual_user) user_id = get_user_id() except Exception as ex: ``` with that, `db.session.add` is only tried if that's an actual `User` object, and not a flask `AnonymousUserMixin` that doesn't seem to serialize well in sqlalchemy. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org