Skip to content

Commit

Permalink
Merge pull request #256 from seattleflu/sample-api-add-date
Browse files Browse the repository at this point in the history
Add date to sample API to be written to details
  • Loading branch information
davereinhart committed Sep 10, 2021
2 parents 70b4363 + 3d616a7 commit eb9887a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/id3c/api/datastore.py
Expand Up @@ -424,7 +424,10 @@ def store_sample(session: DatabaseSession, sample: dict) -> Any:
return result

collected_date = sample.get("collection_date", None)


# Add date to sample so that it gets written to the 'details' column in warehouse.sample
sample["date"] = collected_date

# When updating an existing row, update the identifiers only if the record has both
# the 'sample_barcode' and 'collection_barcode' keys
should_update_identifiers = True if (sample_identifier and collection_identifier) else False
Expand Down

0 comments on commit eb9887a

Please sign in to comment.