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 Command_Modality(SQLAlchemy_ABC, Base):
|
||||
_m = 'Command_Modality.from_json'
|
||||
command_modality = cls()
|
||||
if json is None: return Command_Modality
|
||||
# Helper_App.console_log(f'{_m}\njson: {json}')
|
||||
command_modality.id_command_modality = json.get(cls.ATTR_ID_COMMAND_MODALITY, -1)
|
||||
command_modality.name = json[cls.FLAG_NAME]
|
||||
command_modality.code = json.get(cls.FLAG_CODE, command_modality.name.upper().replace(" ", "_"))
|
||||
command_modality.active = json[cls.FLAG_ACTIVE]
|
||||
# Helper_App.console_log(f'Command_Modality: {command_modality}')
|
||||
command_modality.active = av.input_bool(json[cls.FLAG_ACTIVE], cls.FLAG_ACTIVE, _m)
|
||||
return command_modality
|
||||
|
||||
|
||||
@@ -88,7 +86,6 @@ class Command_Modality(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