]> git.mxchange.org Git - fba.git/blobdiff - fba/models/blocks.py
Continued:
[fba.git] / fba / models / blocks.py
index 70e6eb3f83f12133b0a9b421b40814fe1d75e53e..904286d19b78bfd997104eb07bce061037b638ef 100644 (file)
@@ -40,6 +40,10 @@ def update_reason(reason: str, blocker: str, blocked: str, block_level: str):
         raise ValueError("Parameter 'block_level' is empty")
     elif block_level in ["accept", "suspend", "silence", "nsfw", "quarantined_instances"]:
         raise ValueError(f"block_level='{block_level}' is not wanted.")
+    elif blacklist.is_blacklisted(blocker):
+        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 not is_instance_blocked(blocker, blocked, block_level):
         raise Exception(f"blocker='{blocker}',blocked='{blocked}',block_level='{block_level}' is not registered but function is invoked")