diff --git a/bin/datastore.py b/bin/datastore.py index a70ea0c..4a9967e 100644 --- a/bin/datastore.py +++ b/bin/datastore.py @@ -392,6 +392,14 @@ class Datastore: cursor.execute("BEGIN;") hash = self.add_file(filepath, cursor) + + if not records or len(records) == 0: + print("File has no records (or none have been detected)") + # We add the file to the database anyway to signal that we have + # actually seen it. + self.maybe_commit() + return + incr = p111.point_number(records[0]) <= p111.point_number(records[-1]) # Start by deleting any online data we may have for this sequence