mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 09:07:09 +00:00
Check if raw P1/11 has records.
Even if it hasn't, the file gets imported anyway (into the `files` table) but we exit early to avoid an error when trying to determine shooting direction. This check is not necessary for final P1/11 or gun data. Fixes #104.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user