Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-selo committed Dec 4, 2023
1 parent 3afdd6b commit e6847ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def downgrade() -> None:
op.execute(
"CREATE TYPE artefact_status_enum AS ENUM('APPROVED', 'MARKED_AS_FAILED')"
)
op.execute("ALTER TABLE artefact ALTER COLUMN status SET NULL")
op.execute("ALTER TABLE artefact ALTER COLUMN status DROP NOT NULL")
op.execute("UPDATE artefact SET status = NULL WHERE status = 'UNDECIDED'")
op.execute(
"ALTER TABLE artefact ALTER COLUMN status TYPE "
Expand Down
2 changes: 1 addition & 1 deletion backend/test_observer/data_access/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class Artefact(Base):
)
# Default fields
due_date: Mapped[date | None]
status: Mapped[ArtefactStatus]
status: Mapped[ArtefactStatus] = mapped_column(default=ArtefactStatus.UNDECIDED)

__table_args__ = (
UniqueConstraint("name", "version", "track", name="unique_snap"),
Expand Down

0 comments on commit e6847ed

Please sign in to comment.