Avoid error when no datasync profiles configured

at least, according to the web app none are configured..but they may
be in another config file
This commit is contained in:
Lance Edgar 2022-08-24 20:06:38 -05:00
parent 2dbba970b9
commit 6a0a4627b4

View file

@ -97,7 +97,12 @@ class DataSyncThreadView(MasterView):
process_info = None process_info = None
supervisor_error = simple_error(error) supervisor_error = simple_error(error)
try:
profiles = self.datasync_handler.get_configured_profiles() profiles = self.datasync_handler.get_configured_profiles()
except Exception as error:
log.warning("could not load profiles!", exc_info=True)
self.request.session.flash(simple_error(error), 'error')
profiles = {}
sql = """ sql = """
select source, consumer, count(*) as changes select source, consumer, count(*) as changes