Here's the task I'm trying to do:

Full Code:
test_django_project/m2m_change_triggers/models.py
Here's the issue: 2nd test in
test_django_project/m2m_change_triggers/tests.py fails, but 1st one passes!
Did some digging and found that issue is probably here:
rest_framework/serializers.py#L988-L990The signal is called in both the tests, but `users` field modified by the signal is getting overriden by `field.set(value)` in `ModelSerializer` `save()`
- How do I solve the issue (both the tests should pass)?
- Is using signals the best approach here? Do I have an alternative?
How I've implemented the feature temporarily: using the same thing at the view-level, and not at the model-level.