wagtail / django-modelcluster

Django extension to allow working with 'clusters' of models as a single unit, independently of the database
BSD 3-Clause "New" or "Revised" License
485 stars 66 forks source link

Update `_ClusterTaggableManager.set()` for compatibility with taggit v2 #150

Closed ababic closed 2 years ago

ababic commented 2 years ago

Fixes #147.

Required to unblock #148 and #149

gasman commented 2 years ago

Thanks @ababic! Rather than patching the behaviour of set to allow the old and new signature to work interchangeably, I think it makes sense to follow whatever the underlying taggit API is doing - if taggit has chosen to make a clean break then modelcluster should do the same, rather than effectively put ourselves on the hook for providing a compatibility wrapper between the old and new.

On that basis, we should just fix the test to use the appropriate variant of set for the current taggit version, and leave ClusterTaggableManager unchanged (other than renaming *tags to *args) - I'll open a new PR for this now.