Skip to content

Mark TaggableManager add/set/remove/clear with alters_data - #954

Open
gyanu2507 wants to merge 1 commit into
jazzband:masterfrom
gyanu2507:taggable-manager-alters-data
Open

Mark TaggableManager add/set/remove/clear with alters_data#954
gyanu2507 wants to merge 1 commit into
jazzband:masterfrom
gyanu2507:taggable-manager-alters-data

Conversation

@gyanu2507

Copy link
Copy Markdown

Fixes #953.

Django related managers set alters_data = True on methods that write, so templates won't call them. _TaggableManager.add / set / remove / clear were missing that, so a template lookup that landed on one of them could actually mutate tags.

add/set/remove/clear write to the database. Without the flag,
Django templates can invoke them during rendering.
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.49%. Comparing base (e7a5379) to head (a6637ba).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #954      +/-   ##
==========================================
+ Coverage   89.44%   89.49%   +0.04%     
==========================================
  Files          11       11              
  Lines         862      866       +4     
  Branches      119      119              
==========================================
+ Hits          771      775       +4     
  Misses         69       69              
  Partials       22       22              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

_TaggableManager mutating methods (add/set/remove/clear) are missing alters_data = True

1 participant