8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-05-19 09:02:35 +00:00

Optimisation of domains update

This commit is contained in:
chapeau 2020-06-09 18:49:55 +02:00 committed by Gabriel Detraz
parent 7a6075b741
commit be1c051e98

View file

@ -2482,8 +2482,7 @@ def machinetype_post_save(**kwargs):
parent IP type).
"""
machinetype = kwargs["instance"]
for interface in machinetype.all_interfaces():
interface.update_type()
Domain.objects.filter(interface_parent__machine_type=machinetype).update(extension=machinetype.ip_type.extension)
@receiver(post_save, sender=Domain)