mirror of
https://github.com/laurivosandi/certidude
synced 2024-12-23 00:25:18 +00:00
api: Fixed API call for querying leases
This commit is contained in:
parent
ece05a21e0
commit
c59198887c
@ -37,19 +37,22 @@ class LeaseResource(object):
|
|||||||
|
|
||||||
# BUGBUG
|
# BUGBUG
|
||||||
SQL_LEASES = """
|
SQL_LEASES = """
|
||||||
SELECT
|
select
|
||||||
acquired,
|
acquired,
|
||||||
released,
|
released,
|
||||||
address,
|
address,
|
||||||
identities.data as identity
|
identities.data as identity
|
||||||
FROM
|
from
|
||||||
addresses
|
addresses
|
||||||
RIGHT JOIN
|
right join
|
||||||
identities
|
identities
|
||||||
ON
|
on
|
||||||
identities.id = addresses.identity
|
identities.id = addresses.identity
|
||||||
WHERE
|
where
|
||||||
addresses.released <> 1
|
addresses.released <> 1
|
||||||
|
order by
|
||||||
|
addresses.id
|
||||||
|
desc
|
||||||
"""
|
"""
|
||||||
cnx = config.DATABASE_POOL.get_connection()
|
cnx = config.DATABASE_POOL.get_connection()
|
||||||
cursor = cnx.cursor()
|
cursor = cnx.cursor()
|
||||||
|
Loading…
Reference in New Issue
Block a user