Copilot commented on code in PR #42150:
URL: https://github.com/apache/superset/pull/42150#discussion_r3633282716
##########
superset/security/manager.py:
##########
@@ -1062,12 +1162,25 @@ def query_context_modified(query_context:
"QueryContext") -> bool:
else None
)
+ # A rejected guest load is most often a chart whose saved query_context is
+ # NULL or stale rather than genuine tampering, and the generic 403 gives no
+ # way to tell which comparator objected. Log that here (server-side only,
no
+ # payload values) so the failure is diagnosable; whether the stored
+ # query_context was present is the key signal for the missing/stale case.
+ stored_context_state = "present" if stored_query_context else "missing"
Review Comment:
`stored_context_state` uses truthiness, so an explicitly stored but empty
query_context (e.g. `{}`) will be logged as "missing". Since the intent is to
distinguish NULL/absent from present, check `is not None` instead of relying on
dict truthiness.
--
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]