codeant-ai-for-open-source[bot] commented on code in PR #45437:
URL: https://github.com/apache/superset/pull/45437#discussion_r4306719098
##########
superset/jinja_context.py:
##########
@@ -504,7 +504,7 @@ def filter_values(
val = flt.get("val")
if isinstance(val, list):
return_val.extend(val)
- elif val:
+ elif val is not None:
return_val.append(val)
Review Comment:
**Suggestion:** For a query-context filter with an empty-string value,
`filter_values()` now returns `[""]` instead of treating it as absent, changing
rendered SQL and suppressing the default.
**Assessment:** 🟠 `Major` · 🔁 `Occurrence: Rarely` · 🏷️ `Incorrect condition
logic`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=62d11ff375804ff5b4c0df3cfe2a17a9&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=62d11ff375804ff5b4c0df3cfe2a17a9&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset/jinja_context.py
**Line:** 507:508
**Comment:**
*Incorrect Condition Logic: For a query-context filter with an
empty-string value, `filter_values()` now returns `[""]` instead of treating it
as absent, changing rendered SQL and suppressing the default.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45437&comment_hash=354e5ee16ec754896f8eee2b5fed460be2774aee3d6082fd0b4fb2f098559ed5&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45437&comment_hash=354e5ee16ec754896f8eee2b5fed460be2774aee3d6082fd0b4fb2f098559ed5&reaction=dislike'>👎</a>
--
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]