Skip to content

Commit

Permalink
Use __table__ instead of table in TS model
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Jan 23, 2024
1 parent 7a8f00c commit 331039f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tool_shed/grids/repository_grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,7 @@ def build_initial_query(self, trans, **kwd):
.join(model.Category.table)
.filter(
and_(
model.Category.table.c.id == trans.security.decode_id(kwd["id"]),
model.Category.__table__.c.id == trans.security.decode_id(kwd["id"]),
model.RepositoryMetadata.table.c.downloadable == true(),
)
)
Expand Down
2 changes: 2 additions & 0 deletions lib/tool_shed/webapp/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ class Base(metaclass=DeclarativeMeta):
registry = mapper_registry
metadata = mapper_registry.metadata
__init__ = mapper_registry.constructor
table: Table
__table__: Table

@classmethod
def __declare_last__(cls):
Expand Down

0 comments on commit 331039f

Please sign in to comment.