perf: update date_updated when update user roles

This commit is contained in:
wangruidong
2024-07-09 15:45:34 +08:00
committed by 老广
parent c42913c15e
commit 4adc981a21

View File

@@ -321,6 +321,7 @@ class RoleManager(models.Manager):
add_ids = role_ids - old_ids
self.remove(*del_ids)
self.add(*add_ids)
self.user.save(update_fields=['date_updated'])
def remove(self, *roles):
if not roles: