fix(km): bind published enum compatibly
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 2s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m14s
CD Pipeline / build-and-deploy (push) Failing after 8m1s
CD Pipeline / post-deploy-checks (push) Has been skipped

This commit is contained in:
ogt
2026-07-14 15:35:09 +08:00
parent 0e4118551e
commit 10a19b03dc
2 changed files with 14 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ from src.repositories.knowledge_repository import (
KnowledgeDBRepository,
_enum_text,
_knowledge_enum_db_label,
_knowledge_enum_db_value,
)
@@ -273,3 +274,6 @@ def test_knowledge_enum_db_labels_match_deployed_postgresql_contract() -> None:
assert _knowledge_enum_db_label(EntrySource.HUMAN) == "HUMAN"
assert _knowledge_enum_db_label(EntryStatus.DRAFT) == "DRAFT"
assert _knowledge_enum_db_label(EntryStatus.PUBLISHED) == "published"
assert str(_knowledge_enum_db_value(EntryStatus.PUBLISHED)) == (
"'published'::entrystatus"
)