Skip to content

Commit

Permalink
Set page importable to false when serializing
Browse files Browse the repository at this point in the history
Fixes #18258
  • Loading branch information
mvdbeek committed May 31, 2024
1 parent 7339d96 commit f721755
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f721755

Please sign in to comment.