- update instance when error has happened (ops, missed this)
- also output warning when fields list is empty
except network.exceptions as exception:
logger.warning("Exception '%s' during fetching instances (fetch_instances) from domain='%s'", type(exception), domain)
instances.set_last_error(domain, exception)
+ instances.update(domain)
logger.debug("Success - EXIT!")
return 0
sql_string += f" {key} = ?,"
logger.debug("sql_string(%d)='%s'", len(sql_string), sql_string)
- if sql_string == "":
+ if sql_string == "" or len(fields) == 0:
raise ValueError(f"No fields have been set, but function invoked, domain='{domain}'")
# Set last_updated to current timestamp