Make the admin database counters failsafe
This commit is contained in:
parent
3223dd0edc
commit
5ea9240f34
@ -124,10 +124,14 @@ class BrickSQL(object):
|
||||
# Count the database records
|
||||
def count_records(self) -> list[BrickCounter]:
|
||||
for counter in COUNTERS:
|
||||
# Failsafe this one
|
||||
try:
|
||||
record = self.fetchone('schema/count', table=counter.table)
|
||||
|
||||
if record is not None:
|
||||
counter.count = record['count']
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
return COUNTERS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user