Skip to content

Commit

Permalink
Merge pull request #45 from gbdlin/bugfix/artifacts-order-and-dates-w…
Browse files Browse the repository at this point in the history
…ithout-versions

Fix bugs introduced with upload dates
  • Loading branch information
gbdlin authored Jun 24, 2023
2 parents a3ff7c8 + 13c95b4 commit ef144a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions plugin_store/api/models/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from datetime import datetime
from typing import TYPE_CHECKING
from typing import Optional, TYPE_CHECKING
from zoneinfo import ZoneInfo

from pydantic import BaseModel as PydanticBaseModel
Expand Down Expand Up @@ -84,5 +84,5 @@ class Config:
versions: list[PluginVersionResponse] # type: ignore[assignment]

image_url: str
created: datetime
updated: datetime
created: Optional[datetime]
updated: Optional[datetime]
2 changes: 1 addition & 1 deletion plugin_store/database/models/Artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Artifact(Base):
"Tag", secondary=PluginTag, cascade="all, delete", order_by="Tag.tag", lazy="selectin"
)
versions: "list[Version]" = relationship(
"Version", cascade="all, delete", lazy="selectin", order_by="Version.created.desc()"
"Version", cascade="all, delete", lazy="selectin", order_by="Version.created.desc(), Version.id.asc()"
)
visible: bool = Column(Boolean, default=True)

Expand Down

0 comments on commit ef144a6

Please sign in to comment.