mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-04-21 11:07:30 +00:00
Updated issue templates to include latest version release.
Added `VERSION` file to repository root for easy tracking of current app version. Corrected bug with the latest changes to the settings model that can lead to a JSON decoding error for installations without a properly stored value.
This commit is contained in:
parent
a8895ffe7a
commit
e45324c619
1
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
1
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@ -15,6 +15,7 @@ body:
|
|||||||
label: PDA version
|
label: PDA version
|
||||||
description: What version of PDA are you currently running?
|
description: What version of PDA are you currently running?
|
||||||
options:
|
options:
|
||||||
|
- "0.4.1"
|
||||||
- "0.4.0"
|
- "0.4.0"
|
||||||
- "0.3.0"
|
- "0.3.0"
|
||||||
- "0.2.5"
|
- "0.2.5"
|
||||||
|
1
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
1
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
@ -15,6 +15,7 @@ body:
|
|||||||
label: PDA version
|
label: PDA version
|
||||||
description: What version of PDA are you currently running?
|
description: What version of PDA are you currently running?
|
||||||
options:
|
options:
|
||||||
|
- "0.4.1"
|
||||||
- "0.4.0"
|
- "0.4.0"
|
||||||
- "0.3.0"
|
- "0.3.0"
|
||||||
- "0.2.5"
|
- "0.2.5"
|
||||||
|
@ -459,12 +459,13 @@ class Setting(db.Model):
|
|||||||
|
|
||||||
def convert_type(self, name, value):
|
def convert_type(self, name, value):
|
||||||
import json
|
import json
|
||||||
|
from json import JSONDecodeError
|
||||||
if name in self.types:
|
if name in self.types:
|
||||||
var_type = self.types[name]
|
var_type = self.types[name]
|
||||||
|
|
||||||
# Handle boolean values
|
# Handle boolean values
|
||||||
if var_type == bool:
|
if var_type == bool:
|
||||||
if value == 'True' or value == 'true' or value == '1' or value == True:
|
if value == 'True' or value == 'true' or value == '1' or value is True:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
@ -477,8 +478,11 @@ class Setting(db.Model):
|
|||||||
if var_type == int:
|
if var_type == int:
|
||||||
return int(value)
|
return int(value)
|
||||||
|
|
||||||
if var_type == dict or var_type == list:
|
if (var_type == dict or var_type == list) and isinstance(value, str) and len(value) > 0:
|
||||||
return json.loads(value)
|
try:
|
||||||
|
return json.loads(value)
|
||||||
|
except JSONDecodeError as e:
|
||||||
|
pass
|
||||||
|
|
||||||
if var_type == str:
|
if var_type == str:
|
||||||
return str(value)
|
return str(value)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user