raise ValueError(f"Parameter block_level[]='{type(block_level)}' is not of type 'str'")
elif block_level == "":
raise ValueError("Parameter 'block_level' is empty")
- elif block_level in ["accept", "suspend", "silence", "nsfw"]:
+ elif block_level in ["accept", "suspend", "silence", "nsfw", "quarantined_instances"]:
raise ValueError(f"block_level='{block_level}' is not wanted.")
logger.debug("Updating block reason='%s',blocker='%s',blocked='%s',block_level='%s'", reason, blocker, blocked, block_level)
raise ValueError(f"Parameter block_level[]='{type(block_level)}' is not of type 'str'")
elif block_level == "":
raise ValueError("Parameter 'block_level' is empty")
- elif block_level in ["accept", "suspend", "silence", "nsfw"]:
+ elif block_level in ["accept", "suspend", "silence", "nsfw", "quarantined_instances"]:
raise ValueError(f"blocked='{blocked}' has unwanted block_level='{block_level}'")
database.cursor.execute(
raise ValueError(f"Parameter block_level[]='{type(block_level)}' is not of type 'str'")
elif block_level == "":
raise ValueError("Parameter 'block_level' is empty")
- elif block_level in ["accept", "suspend", "silence", "nsfw"]:
+ elif block_level in ["accept", "suspend", "silence", "nsfw", "quarantined_instances"]:
raise ValueError(f"blocked='{blocked}' has unwanted block_level='{block_level}'")
if block_level is None:
raise Exception(f"blocker='{blocker}' is blacklisted but function invoked")
elif blacklist.is_blacklisted(blocked):
raise Exception(f"blocked='{blocked}' is blacklisted but function invoked")
- elif block_level in ["accept", "suspend", "silence", "nsfw"]:
+ elif block_level in ["accept", "suspend", "silence", "nsfw", "quarantined_instances"]:
raise ValueError(f"blocked='{blocked}' has unwanted block_level='{block_level}'")
if reason is not None:
elif block_level == "nsfw":
logger.debug("Block level 'nsfw' has been changed to 'media_nsfw'")
block_level = "media_nsfw"
+ elif block_level == "quarantined_instances":
+ logger.debug("Block level 'quarantined_instances' has been changed to 'quarantined'")
+ block_level = "quarantined"
logger.debug("block_level='%s' - EXIT!", block_level)
return block_level