fix NameError in Connection.delete_instance

This commit is contained in:
Izalia Mae 2022-12-14 09:03:57 -05:00
parent 1d8de63d95
commit e3c4377db6

View file

@ -125,7 +125,7 @@ class Connection(tinysql.ConnectionMixin):
row = self.get_instance(domain)
if not row:
raise KeyError(name)
raise KeyError(domain)
self.delete('instances', id=row.id)
@ -192,6 +192,7 @@ class Connection(tinysql.ConnectionMixin):
def get_instances(self):
query = 'SELECT * FROM instances WHERE joined IS NOT NULL'
query += ' ORDER BY domain ASC'
return self.execute(query, table='instances').all()
@ -204,7 +205,7 @@ class Connection(tinysql.ConnectionMixin):
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()