Skip to content

Commit

Permalink
Fix datetime format (#2846) (patch)
Browse files Browse the repository at this point in the history
### Fixed

- Wrap last_sequenced_at as string in metadata, if present.
  • Loading branch information
islean authored Jan 16, 2024
1 parent b5627e4 commit b922b73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cg/meta/archive/ddn/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ def get_metadata(sample: Sample) -> list[dict]:
},
{
MetadataFields.NAME.value: MetadataFields.SEQUENCED_AT.value,
MetadataFields.VALUE.value: sample.last_sequenced_at,
MetadataFields.VALUE.value: str(sample.last_sequenced_at)
if sample.last_sequenced_at
else sample.last_sequenced_at,
},
{
MetadataFields.NAME.value: MetadataFields.TICKET_NUMBER.value,
Expand Down
1 change: 1 addition & 0 deletions tests/meta/archive/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def archive_store(
),
]
new_samples[0].customer = customer_ddn
new_samples[0].last_sequenced_at = datetime.now()
new_samples[1].customer = customer_ddn
new_samples[2].customer = customer_without_ddn

Expand Down

0 comments on commit b922b73

Please sign in to comment.