From f7217555d61ae2c8223bfe6cc11535c850026538 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 29 May 2024 18:45:23 +0200 Subject: [PATCH] Set page importable to false when serializing Fixes https://github.com/galaxyproject/galaxy/issues/18258 --- lib/galaxy/model/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index 43d6bbe35586..842e4634806d 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -10085,7 +10085,7 @@ class Page(Base, HasTags, Dictifiable, RepresentById, UsesCreateAndUpdateTime): ) title = Column(TEXT) deleted = Column(Boolean, index=True, default=False) - importable = Column(Boolean, index=True, default=False) + importable = Column(Boolean, index=True, default=False, key="_importable") slug = Column(TEXT) published = Column(Boolean, index=True, default=False) user = relationship("User") @@ -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)