mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-25 15:58:49 +00:00
Merge branch 'dev' into 'main'
1.3.2 See merge request oscar.krause/fastapi-dls!20
This commit is contained in:
commit
164b5ebc44
@ -170,8 +170,9 @@ async def _leases(request: Request, origin: bool = False):
|
|||||||
for lease in session.query(Lease).all():
|
for lease in session.query(Lease).all():
|
||||||
x = lease.serialize()
|
x = lease.serialize()
|
||||||
if origin:
|
if origin:
|
||||||
# assume that each lease has a valid origin record
|
lease_origin = session.query(Origin).filter(Origin.origin_ref == lease.origin_ref).first()
|
||||||
x['origin'] = session.query(Origin).filter(Origin.origin_ref == lease.origin_ref).first().serialize()
|
if lease_origin is not None:
|
||||||
|
x['origin'] = lease_origin.serialize()
|
||||||
response.append(x)
|
response.append(x)
|
||||||
session.close()
|
session.close()
|
||||||
return JSONr(response)
|
return JSONr(response)
|
||||||
|
@ -1 +1 @@
|
|||||||
VERSION=1.3.1
|
VERSION=1.3.2
|
||||||
|
Loading…
Reference in New Issue
Block a user