Skip to content

Commit

Permalink
Fix method resolution order for base model class
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Apr 5, 2024
1 parent 8a8a422 commit eea15e5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,6 @@
from galaxy.tools import DefaultToolState
from galaxy.workflow.modules import WorkflowModule

class _HasTable:
table: FromClause
__table__: FromClause

else:
_HasTable = object


def get_uuid(uuid: Optional[Union[UUID, str]] = None) -> UUID:
if isinstance(uuid, UUID):
Expand All @@ -246,6 +239,11 @@ def get_uuid(uuid: Optional[Union[UUID, str]] = None) -> UUID:
return UUID(str(uuid))


class _HasTable:
table: FromClause
__table__: FromClause


class Base(_HasTable, DeclarativeBase):
__abstract__ = True
metadata = MetaData(naming_convention=NAMING_CONVENTION)
Expand Down

0 comments on commit eea15e5

Please sign in to comment.