kopia lustrzana https://github.com/wagtail/wagtail
Prefetch specific model instances
This reduces the number of queries performed during delete, slightly.pull/8321/head
rodzic
ee03f9d975
commit
20336adfaf
|
@ -559,8 +559,8 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase):
|
||||||
user=user,
|
user=user,
|
||||||
deleted=True,
|
deleted=True,
|
||||||
)
|
)
|
||||||
for child in self.get_descendants():
|
for child in self.get_descendants().specific():
|
||||||
log_deletion(child.specific, user)
|
log_deletion(child, user)
|
||||||
log_deletion(self.specific, user)
|
log_deletion(self.specific, user)
|
||||||
|
|
||||||
# this is a Page instance, so carry on as we were
|
# this is a Page instance, so carry on as we were
|
||||||
|
|
Ładowanie…
Reference in New Issue