Updated set() method and adds tests #77

Closed
wants to merge 2 commits into
from

Projects

None yet

3 participants

@lsemel
lsemel commented Jul 28, 2011

I was using taggit in a form and noticed whenever the form was saved, Taggit would delete and recreate all the entries in the taggeditem table, issuing a load of database queries. set() in TaggableManager was being called, which, clears all the tags and then re-adds them.

I updated this so it only issues queries for tags that are added and removed.

@issackelly

Confirmed, tests pass;

@apollo13
Contributor

.add uses bulk_create nowadays so this should no longer be an issue.

@apollo13 apollo13 closed this Mar 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment