diff --git a/crud.py b/crud.py index 824c0bb..b4445dd 100644 --- a/crud.py +++ b/crud.py @@ -391,9 +391,12 @@ async def get_accounts( allowed=True, blocked=False, ) -> List[NostrAccount]: + + if not allowed and not blocked: + return [] + rows = await db.fetchall( - "SELECT * FROM nostrrelay.accounts WHERE relay_id = ? AND allowed = ? AND blocked = ?", + "SELECT * FROM nostrrelay.accounts WHERE relay_id = ? AND allowed = ? OR blocked = ?", (relay_id, allowed, blocked), ) - return [NostrAccount.from_row(row) for row in rows] diff --git a/static/components/relay-details/relay-details.html b/static/components/relay-details/relay-details.html index 8896a0d..d8c7685 100644 --- a/static/components/relay-details/relay-details.html +++ b/static/components/relay-details/relay-details.html @@ -609,7 +609,6 @@ row-key="pubkey" :columns="accountsTable.columns" :pagination.sync="accountsTable.pagination" - :filter="accountsFilter" >