test tiramisu-json version
This commit is contained in:
parent
a0b08ea1c8
commit
dae6779e72
@ -9,6 +9,8 @@ from .setting import undefined
|
||||
from .i18n import _
|
||||
|
||||
|
||||
TIRAMISU_JSON_VERSION = '1.0'
|
||||
|
||||
|
||||
TYPE = {'boolean': bool,
|
||||
'integer': int,
|
||||
@ -488,6 +490,8 @@ class Config:
|
||||
# config
|
||||
def __init__(self,
|
||||
json):
|
||||
if json.get('version') != TIRAMISU_JSON_VERSION:
|
||||
raise Exception('incompatible tiramisu-json format version (got {}, expected {})'.format(json.get('version', '0.0'), TIRAMISU_JSON_VERSION))
|
||||
self.model = json['model']
|
||||
self.form = json['form']
|
||||
self.form = {}
|
||||
|
Loading…
Reference in New Issue
Block a user