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:
2025-07-28 22:41:38 +01:00
parent 1bbe6f0040
commit 574d60442a
122 changed files with 3261 additions and 1057 deletions

View File

@@ -64,13 +64,11 @@ class Colour(SQLAlchemy_ABC, Base):
_m = f'{cls.__qualname__}.from_json'
colour = cls()
if json is None: return colour
# Helper_App.console_log(f'{_m}\njson: {json}')
colour.id_colour = json.get(Colour.ATTR_ID_COLOUR, -1)
colour.name = json[cls.FLAG_NAME]
colour.code = json.get(cls.FLAG_CODE, colour.name.upper().replace(" ", "_"))
colour.active = json[cls.FLAG_ACTIVE]
colour.active = av.input_bool(json[cls.FLAG_ACTIVE], cls.FLAG_ACTIVE, _m)
colour.created_on = json.get(cls.FLAG_CREATED_ON, None)
# Helper_App.console_log(f'Colour: {colour}')
return colour
def to_json(self):
@@ -82,7 +80,6 @@ class Colour(SQLAlchemy_ABC, Base):
, self.FLAG_ACTIVE: self.active
, self.FLAG_CREATED_ON: self.created_on
}
# Helper_App.console_log(f'as_json: {as_json}')
return as_json
def __repr__(self):