mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-23 15:08:00 +00:00
fix NameError in Connection.delete_instance
This commit is contained in:
parent
1d8de63d95
commit
e3c4377db6
|
@ -125,7 +125,7 @@ class Connection(tinysql.ConnectionMixin):
|
||||||
row = self.get_instance(domain)
|
row = self.get_instance(domain)
|
||||||
|
|
||||||
if not row:
|
if not row:
|
||||||
raise KeyError(name)
|
raise KeyError(domain)
|
||||||
|
|
||||||
self.delete('instances', id=row.id)
|
self.delete('instances', id=row.id)
|
||||||
|
|
||||||
|
@ -192,6 +192,7 @@ class Connection(tinysql.ConnectionMixin):
|
||||||
|
|
||||||
def get_instances(self):
|
def get_instances(self):
|
||||||
query = 'SELECT * FROM instances WHERE joined IS NOT NULL'
|
query = 'SELECT * FROM instances WHERE joined IS NOT NULL'
|
||||||
|
query += ' ORDER BY domain ASC'
|
||||||
return self.execute(query, table='instances').all()
|
return self.execute(query, table='instances').all()
|
||||||
|
|
||||||
|
|
||||||
|
@ -204,7 +205,7 @@ class Connection(tinysql.ConnectionMixin):
|
||||||
|
|
||||||
|
|
||||||
def get_requests(self):
|
def get_requests(self):
|
||||||
query = 'SELECT * FROM instances WHERE joined IS NULL'
|
query = 'SELECT * FROM instances WHERE joined IS NULL ORDER BY domain ASC'
|
||||||
return self.execute(query, table='instances').all()
|
return self.execute(query, table='instances').all()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue