Browse Source

Merge "Fix invalid JSON generated by quota details" into stable/rocky

changes/44/783544/1
Zuul 7 months ago
committed by Gerrit Code Review
parent
commit
6961ac137b
  1. 5
      neutron/objects/quota.py

5
neutron/objects/quota.py

@ -15,6 +15,7 @@
from oslo_versionedobjects import fields as obj_fields
import sqlalchemy as sa
from sqlalchemy import sql
from sqlalchemy import types as sqltypes
from neutron.db.quota import models
from neutron.objects import base
@ -90,7 +91,9 @@ class Reservation(base.NeutronDbObject):
resv_query = context.session.query(
models.ResourceDelta.resource,
models.Reservation.expiration,
sql.func.sum(models.ResourceDelta.amount)).join(
sql.func.cast(
sql.func.sum(models.ResourceDelta.amount),
sqltypes.Integer)).join(
models.Reservation)
if expired:
exp_expr = (models.Reservation.expiration < now)

Loading…
Cancel
Save