Skip to content

Commit 6bb445c

Browse files
committed
Tag release 2.12.1
- Fix issue when no scans / deaths
1 parent 5a45cd6 commit 6bb445c

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/bio_scan/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
name = 'BioScan'
2-
version = '2.12.0'
2+
version = '2.12.1'
33
db_version = 11

src/load.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,8 +1789,10 @@ def get_unsold_data() -> int:
17891789
else:
17901790
data_cutoff_time = last_data_loss
17911791

1792-
recent_scans: list[FloraScans] = this.sql_session.scalars(select(FloraScans).where(FloraScans.commander_id == this.commander.id)
1793-
.where(FloraScans.scanned_at > data_cutoff_time).where(FloraScans.count == 3)).all()
1792+
recent_scans = []
1793+
if data_cutoff_time:
1794+
recent_scans: list[FloraScans] = this.sql_session.scalars(select(FloraScans).where(FloraScans.commander_id == this.commander.id)
1795+
.where(FloraScans.scanned_at > data_cutoff_time).where(FloraScans.count == 3)).all()
17941796

17951797
value = 0
17961798
if len(recent_scans) > 0:

0 commit comments

Comments
 (0)