codeant-ai-for-open-source[bot] commented on code in PR #45061:
URL: https://github.com/apache/superset/pull/45061#discussion_r4221629191


##########
superset/semantic_layers/api.py:
##########
@@ -84,6 +86,30 @@
 logger = logging.getLogger(__name__)
 
 
+def _refuse_disabled_semantic_layers() -> FlaskResponse | None:
+    """Refuse semantic API dispatch before authentication or handler side 
effects."""
+    if not is_semantic_layers_enabled():
+        return BaseSupersetApi.response(404, message="Not found")

Review Comment:
   ✅ **Customized review instruction saved!**
   
   **Instruction:**
   > Do not flag calls to Flask-AppBuilder's static `response` method as 
requiring an API instance.
   
   **Applied to:**
     - `superset/semantic_layers/api.py`
   
   ---
   💡 *To manage or update this instruction, visit: [CodeAnt AI 
Settings](https://app.codeant.ai/org/settings/learnings)*



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