Check if authority options is JSON Array
This commit is contained in:
parent
bbfc65813d
commit
4e44dd3d8f
|
@ -93,9 +93,11 @@ class Authority(db.Model):
|
||||||
if not self.options:
|
if not self.options:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
for option in json.loads(self.options):
|
options_array = json.loads(self.options)
|
||||||
if "name" in option and option["name"] == 'cab_compliant':
|
if isinstance(options_array, list):
|
||||||
return option["value"]
|
for option in options_array:
|
||||||
|
if "name" in option and option["name"] == 'cab_compliant':
|
||||||
|
return option["value"]
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue