Include connection errors in exception handling

This commit is contained in:
2022-08-20 12:58:47 +01:00
parent 168b2b288a
commit 72f2af1df8
15 changed files with 63 additions and 68 deletions

View File

@@ -50,7 +50,7 @@ def get_time_options():
def get_dataset_choices():
from ..models import Dataset
try: datasets = Dataset.query.all()
except SQLAlchemyError as exception:
except (SQLAlchemyError, ConnectionError) as exception:
write('system.log', f'Database error when fetching dataset lists: {exception}')
return []
dataset_choices = []