logger.debug("domain='%s' - CALLED!", domain)
domain_helper.raise_on(domain)
+ if not is_registered(domain):
+ raise ValueError(f"domain='{domain}' is not registered but function was invoked.")
+
has = False
for key in _pending:
logger.debug("key='%s',domain='%s',_pending[key]()=%d", key, domain, len(_pending[key]))
if domain in _pending[key]:
+ logger.debug("domain='%s' at key='%s' has pending data ...", domain, key)
has = True
break
def update(domain: str):
logger.debug("domain='%s' - CALLED!", domain)
domain_helper.raise_on(domain)
- if not has_pending(domain):
- raise Exception(f"domain='{domain}' has no pending instance data, but function invoked")
- elif not is_registered(domain):
+
+ if not is_registered(domain):
raise Exception(f"domain='{domain}' cannot be updated while not being registered")
+ elif not has_pending(domain):
+ raise Exception(f"domain='{domain}' has no pending instance data, but function invoked")
logger.debug("Updating instance data for domain='%s' ...", domain)
sql_string = ""
def is_registered(domain: str, skip_raise = False) -> bool:
logger.debug("domain='%s',skip_raise='%s' - CALLED!", domain, skip_raise)
+ domain_helper.raise_on(domain)
+
if not isinstance(skip_raise, bool):
raise ValueError(f"skip_raise[]='{type(skip_raise)}' is not type of 'bool'")
raise ValueError(f"char='{char}' not found in domain='{domain}' but function invoked")
elif not isinstance(domain, str):
raise ValueError(f"Parameter domain[]='{type(domain)}'")
- elif domain == "":
- raise ValueError("Parameter 'domain' is empty")
elif not isinstance(blocked_hash, str) and blocked_hash is not None:
raise ValueError(f"Parameter blocked_hash[]='{type(blocked_hash)}' is not of type 'str'")