Fix delete zone transfer request with scoped token

This patch fixes an issue were deleting a zone transfer request with a scoped
token may fail.

Change-Id: I4522796ac056630c63798830e8f8d92628f14a37
This commit is contained in:
Michael Johnson
2022-04-01 22:25:07 +00:00
parent dc4ce8a1c1
commit 6f847aeb5a
2 changed files with 7 additions and 0 deletions

View File

@@ -1490,6 +1490,8 @@ class SQLAlchemyStorage(sqlalchemy_base.SQLAlchemy, storage_base.Storage):
# all_tenants was not used, we don't know what records to return,
# so return an empty list.
if not context.project_id:
if one:
return objects.ZoneTransferRequest()
return objects.ZoneTransferRequestList()
query = query.where(or_(

View File

@@ -0,0 +1,5 @@
---
fixes:
- |
Fixed a bug where deleting a zone transfer request may fail when using
a system scoped token.