Skip to content

[FIX] thankyou_letters: donation list crashes on len() in row decoration - #2226

Open
davidwul wants to merge 1 commit into
18.0from
fix-thankyou-list-len-decoration
Open

davidwul wants to merge 1 commit into
18.0from
fix-thankyou-list-len-decoration

Conversation

@davidwul

@davidwul davidwul commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Opening a communication from the Donation thank you menu crashed the web client:

EvalError: Can not evaluate python expression: (bool(need_call!=False and len(activity_ids)))
Error: Name 'len' is not defined

The list view communication_job_tree_thankyou_donation_amount used len() in decoration-danger. In v18 the web client evaluates decorations with its own Python interpreter, which has no len. An empty x2many is already falsy there, so the condition becomes need_call and activity_ids (same rows highlighted as before).

If the view was patched through the UI in production, the next -u thankyou_letters replaces that edit with this one.

🤖 Generated with Claude Code

The web client evaluates list decorations with its own Python
interpreter, which has no len(): opening the donation thank you list
raised 'Name len is not defined'. An empty x2many is already falsy there.

Assisted-by: claude-opus-5-5, medium, claude-code
@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The change appears safe to merge.

Reviews (1) · Last reviewed commit: "[FIX] thankyou_letters: donation list cr..." · Reviewed by Greptile

@davidwul

Copy link
Copy Markdown
Contributor Author

I made the change in the view on the production env. But this will be again as soon as the module is updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant