Replace deprecated with_lockmode with with_for_update
The Query.with_lockmode() method is deprecated since version 0.9.0 and will be removed in a future release. [1] This patch replaces it with Query.with_for_update(). [1] https://docs.sqlalchemy.org/en/13/orm/query.html#sqlalchemy.orm.query.Query.with_lockmode Change-Id: I735c7825ac490e695122bf64ca1f758bdd9d81ad
This commit is contained in:
parent
5ce92a4067
commit
68d8de3cf9
|
@ -1413,7 +1413,7 @@ def _quota_reservations(session, context, reservations):
|
||||||
read_deleted="no",
|
read_deleted="no",
|
||||||
session=session).\
|
session=session).\
|
||||||
filter(models.Reservation.uuid.in_(reservations)).\
|
filter(models.Reservation.uuid.in_(reservations)).\
|
||||||
with_lockmode('update').\
|
with_for_update().\
|
||||||
all()
|
all()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue