Use zone.tenant_id when context.project_id is None for pdns3

Similar to Bug 1838379, that most likely affects the pdns3
implementation as well.

The periodic recovery job creates a new context that does
not contain the project_id. This commit adds a fallback to the
zone tenant_id.

Change-Id: I7578414cad7064433701defc2f14bde5cfb6007d
This commit is contained in:
Erik Olof Gunnar Andersson 2019-08-07 11:33:12 -07:00
parent 4ca278f805
commit ed34f9a307
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ class PowerDNSBackend(base.Backend):
'name': zone['name'].rstrip('.'),
'master': ','.join(masters),
'type': 'SLAVE',
'account': context.project_id
'account': context.project_id or zone.tenant_id
}
self._create(sess, tables.domains, domain_values)