Include connection errors in exception handling
This commit is contained in:
@@ -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 = []
|
||||
|
Reference in New Issue
Block a user