Skip to content

Commit

Permalink
Update serialise_value.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nora-Olivia-Ammann committed Nov 15, 2024
1 parent 7a9893e commit 7eb5c85
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def serialise(self) -> dict[str, Any]:

def _get_one_date_dict(self, date: SingleDate, start_end: StartEnd) -> dict[str, Any]:
def get_prop(precision: DayMonthYearEra) -> str:
return f"knora-api:dateValueHas{start_end!s}{precision!s}"
return f"knora-api:dateValueHas{start_end.value}{precision.value}"

date_dict: dict[str, Any] = {get_prop(DayMonthYearEra.YEAR): date.year} if date.year else {}
if date.month:
Expand Down

0 comments on commit 7eb5c85

Please sign in to comment.