Skip to content

Commit

Permalink
just in case it's empty...
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Garcia Reolid <[email protected]>
  • Loading branch information
victorgarcia98 committed Jul 17, 2024
1 parent 92660a0 commit 9b43136
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions timely_beliefs/beliefs/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ def add_to_session(
beliefs_data_frame["sensor_id"] = beliefs_data_frame.sensor.id
beliefs_data_frame = beliefs_data_frame.drop(columns=["source"])

if len(beliefs_data_frame) == 0:
return

smt = insert(cls).values(beliefs_data_frame.to_dict("records"))

if allow_overwrite:
Expand Down

0 comments on commit 9b43136

Please sign in to comment.