bito-code-review[bot] commented on PR #42150: URL: https://github.com/apache/superset/pull/42150#issuecomment-5050666663
<!-- Bito Reply --> The suggestion to use `is not None` instead of truthiness for `stored_query_context` is correct. Relying on truthiness for a dictionary can lead to false negatives if the dictionary is empty, whereas `is not None` explicitly checks for the presence of the object, which is the intended behavior for distinguishing between a missing and an empty context. **superset/security/manager.py** ``` - stored_context_state = "present" if stored_query_context else "missing" + stored_context_state = "present" if stored_query_context is not None else "missing" ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
