Add uselist=True to subnet rbac_entries relationship
Because the join conditions for Subnet rbac entries
are manually specified, SQLAlchemy is not
automatically detecting that this relationship is a list.
This adds the uselist=True kwarg to the relationship to
ensure that it's always handled as a list.
Change-Id: Ia4ae57ddd932260691584ae74c0305a79b2e60a9
Closes-Bug: #1557959
(cherry picked from commit 691f8f5ea5
)
This commit is contained in:
parent
80c320bb29
commit
fa5eb530bb
|
@ -220,7 +220,7 @@ class Subnet(model_base.HasStandardAttributes, model_base.BASEV2,
|
|||
# subnets don't have their own rbac_entries, they just inherit from
|
||||
# the network rbac entries
|
||||
rbac_entries = orm.relationship(
|
||||
rbac_db_models.NetworkRBAC, lazy='joined',
|
||||
rbac_db_models.NetworkRBAC, lazy='joined', uselist=True,
|
||||
foreign_keys='Subnet.network_id',
|
||||
primaryjoin='Subnet.network_id==NetworkRBAC.object_id')
|
||||
|
||||
|
|
Loading…
Reference in New Issue