Do not import gun data into online shots.

These shots will be deleted when the raw P1 is
imported deleting the gun data, but the gun data
file will show as having been imported.

(#29)
This commit is contained in:
D. Berge
2020-10-06 18:31:45 +02:00
parent efc1711158
commit 83d966c4b7

View File

@@ -488,7 +488,7 @@ class Datastore:
# The shots should already exist, e.g., from a P1 import
# …but what about if the SMSRC file gets read *before* the P1?
# We need to check
qry = "SELECT count(*) FROM raw_shots WHERE sequence = %s;"
qry = "SELECT count(*) FROM raw_shots WHERE sequence = %s AND hash != '*online*';"
values = (fileinfo["sequence"],)
cursor.execute(qry, values)
shotcount = cursor.fetchone()[0]