Skip to content

Commit

Permalink
Simplify WikiTag model
Browse files Browse the repository at this point in the history
  • Loading branch information
vaamb committed Jan 31, 2025
1 parent 962472e commit 687180e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/ouranos/core/database/models/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,6 @@ class WikiTag(Base, CRUDMixin, AsyncAttrs):
id: Mapped[int] = mapped_column(primary_key=True)
name: Mapped[str] = mapped_column(sa.String(length=64), unique=True)
description: Mapped[Optional[str]] = mapped_column(sa.String(length=512))
status: Mapped[bool] = mapped_column(default=True)

# relationship
topics: Mapped[list[WikiTopic]] = relationship(
Expand Down Expand Up @@ -866,17 +865,6 @@ async def create_multiple(
value["name"] = value["name"].replace(" ", "_").lower()
await super().create_multiple(session, values=values)

@classmethod
def _generate_get_query(
cls,
offset: int | None = None,
limit: int | None = None,
order_by: str | None = None,
**lookup_keys: list[lookup_keys_type] | lookup_keys_type | None,
) -> Select:
lookup_keys["status"] = True
return super()._generate_get_query(offset, limit, order_by, **lookup_keys)


class WikiObject:
@staticmethod
Expand Down

0 comments on commit 687180e

Please sign in to comment.