From 58998e1c176fe4c2cf37f8c581df04f8d77c2962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Wed, 25 Jan 2023 23:35:04 +0100 Subject: [PATCH] fix: Allow name to be empty in local blocklist --- mastodon_blocklist_deploy/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mastodon_blocklist_deploy/models.py b/mastodon_blocklist_deploy/models.py index 5997ab0..1fad913 100644 --- a/mastodon_blocklist_deploy/models.py +++ b/mastodon_blocklist_deploy/models.py @@ -38,7 +38,10 @@ class Instance: self.reject_reports = instance_dict["reject_reports"] def parse_local_block(self, instance_dict): - self.name = instance_dict["name"] + try: + self.name = instance_dict["name"] + except KeyError: + pass self.domain = instance_dict["domain"] self.severity = instance_dict["severity"] self.public_comment = instance_dict["public_comment"]