From 1d8de63d95d4fcd84a54d4c54a499242d04aa65c Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Wed, 14 Dec 2022 08:39:56 -0500 Subject: [PATCH] fix AttributeError when fetching an instance by name --- relay/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relay/database.py b/relay/database.py index f595d62..70b4e25 100644 --- a/relay/database.py +++ b/relay/database.py @@ -187,7 +187,7 @@ class Connection(tinysql.ConnectionMixin): query = 'SELECT * FROM instances WHERE domain = :data OR actor = :data OR inbox = :data' row = self.execute(query, dict(data=data), table='instances').one() - return row if row.joined else None + return row if row and row.joined else None def get_instances(self):