Feat: Assessment page completed with save method combining Assessment, Distraction, Assessment Command Modality Link, and Assessment Response save for creating new complete Assessnent.
This commit is contained in:
@@ -71,12 +71,10 @@ class Bribe(SQLAlchemy_ABC, Base):
|
||||
_m = 'Bribe.from_json'
|
||||
bribe = cls()
|
||||
if json is None: return Bribe
|
||||
# Helper_App.console_log(f'{_m}\njson: {json}')
|
||||
bribe.id_bribe = json.get(cls.ATTR_ID_BRIBE, -1)
|
||||
bribe.name = json[cls.FLAG_NAME]
|
||||
bribe.code = json.get(cls.FLAG_CODE, bribe.name.upper().replace(" ", "_"))
|
||||
bribe.active = json[cls.FLAG_ACTIVE]
|
||||
# Helper_App.console_log(f'Bribe: {bribe}')
|
||||
bribe.active = av.input_bool(json[cls.FLAG_ACTIVE], cls.FLAG_ACTIVE, _m)
|
||||
return bribe
|
||||
|
||||
|
||||
@@ -88,7 +86,6 @@ class Bribe(SQLAlchemy_ABC, Base):
|
||||
, self.FLAG_NAME: self.name
|
||||
, self.FLAG_ACTIVE: self.active
|
||||
}
|
||||
# Helper_App.console_log(f'as_json: {as_json}')
|
||||
return as_json
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
Reference in New Issue
Block a user