Merge pull request #18263 from mvdbeek/page_summary_fix

[24.0] Set page importable to false when serializing
This commit is contained in:
Marius van den Beek
2024-05-31 12:37:30 +02:00
committed by GitHub
+4
View File
@@ -10135,6 +10135,10 @@ class Page(Base, HasTags, Dictifiable, RepresentById, UsesCreateAndUpdateTime):
def to_dict(self, view="element"):
rval = super().to_dict(view=view)
if "importable" in rval and rval["importable"] is None:
# pages created prior to 2011 might not have importable field
# probably not worth creating a migration to fix that
rval["importable"] = False
rev = []
for a in self.revisions:
rev.append(a.id)