Merge "handle missing access_rules"
This commit is contained in:
commit
0b6ac97fcd
|
@ -132,6 +132,9 @@ class CreateApplicationCredentialForm(forms.SelfHandlingForm):
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
cleaned_data = super().clean()
|
cleaned_data = super().clean()
|
||||||
|
# access_rules field exists only when keystone API >= 3.13 and
|
||||||
|
# the field is deleted above when a lower version of API is used.
|
||||||
|
if 'access_rules' in cleaned_data:
|
||||||
try:
|
try:
|
||||||
cleaned_data['access_rules'] = yaml.safe_load(
|
cleaned_data['access_rules'] = yaml.safe_load(
|
||||||
cleaned_data['access_rules'])
|
cleaned_data['access_rules'])
|
||||||
|
|
Loading…
Reference in New Issue