aminghadersohi commented on code in PR #40746:
URL: https://github.com/apache/superset/pull/40746#discussion_r3389754079


##########
superset/mcp_service/user/schemas.py:
##########
@@ -295,8 +322,6 @@ def serialize_user_object(
         email=escape_llm_context_delimiters(getattr(user, "email", None))
         if include_sensitive
         else None,
-        roles=[sanitize_for_llm_context(r, field_path=("roles",)) for r in 
roles]
-        if roles is not None
-        else None,
+        roles=roles if roles is not None else None,

Review Comment:
   **nit:** `x if x is not None else None` is always equal to `x`, so this 
guard is vacuous — the ternary can just be `roles=roles,`.



-- 
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]

Reply via email to