Merge branch 'dev' into 'main'

1.3.2

See merge request oscar.krause/fastapi-dls!20
This commit is contained in:
Oscar Krause 2023-01-17 11:36:23 +01:00
commit 164b5ebc44
2 changed files with 4 additions and 3 deletions

View File

@ -170,8 +170,9 @@ async def _leases(request: Request, origin: bool = False):
for lease in session.query(Lease).all():
x = lease.serialize()
if origin:
# assume that each lease has a valid origin record
x['origin'] = session.query(Origin).filter(Origin.origin_ref == lease.origin_ref).first().serialize()
lease_origin = session.query(Origin).filter(Origin.origin_ref == lease.origin_ref).first()
if lease_origin is not None:
x['origin'] = lease_origin.serialize()
response.append(x)
session.close()
return JSONr(response)

View File

@ -1 +1 @@
VERSION=1.3.1
VERSION=1.3.2