send signal after set_save_status

This commit is contained in:
huangsong
2022-01-14 18:30:19 +08:00
parent 94e6c61032
commit 18bab1f17b

View File

@ -1132,11 +1132,11 @@ class QuerySet(Generic[T]):
expr = str(expr) expr = str(expr)
await self.database.execute_many(expr, ready_objects) await self.database.execute_many(expr, ready_objects)
entity = list(objects)[0] for obj in objects:
obj.set_save_status(True)
entity = list(objects)[0]
await entity.signals.post_bulk_update.send( await entity.signals.post_bulk_update.send(
sender=entity.__class__, instances=objects sender=entity.__class__, instances=objects
) )
for obj in objects:
obj.set_save_status(True)