perf: 账号模版 生成随机密码密钥及账号批量更新500

This commit is contained in:
feng
2023-09-26 12:06:54 +08:00
committed by Bryan
parent cbe3d66b39
commit 56a26481a4
2 changed files with 15 additions and 2 deletions

View File

@@ -37,8 +37,8 @@ class VaultManagerMixin(models.Manager):
post_save.send(obj.__class__, instance=obj, created=True)
return objs
def bulk_update(self, objs, batch_size=None, ignore_conflicts=False):
objs = super().bulk_update(objs, batch_size=batch_size, ignore_conflicts=ignore_conflicts)
def bulk_update(self, objs, fields, batch_size=None):
objs = super().bulk_update(objs, fields, batch_size=batch_size)
for obj in objs:
post_save.send(obj.__class__, instance=obj, created=False)
return objs