Skip to content
Snippets Groups Projects
Commit a447505b authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

ENH: Add event to sample

parent 3d636dab
No related branches found
No related tags found
1 merge request!1F awi sams
......@@ -32,7 +32,8 @@ def add_event_to_sample(sample: db.Record, data: pd.Series) -> db.Record:
"""
_perform_sanity_checks(sample, data)
event = db.Record().add_parent(get_entity_name("event_rt"))
event_rt = db.get_entity_by_name(get_entity_name("event_rt"), role="RECORDTYPE")
event = db.Record().add_parent(event_rt)
# We performed the sanity checks so we can assume that if the
# Start/Stop Latitude exists, all start/stop data exist.
......@@ -57,6 +58,8 @@ def add_event_to_sample(sample: db.Record, data: pd.Series) -> db.Record:
# TODO: Start/end date, remaining event props
sample = update_property(sample, event_rt.id, event)
return sample
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment