Enhance API robustness: Add model validators, view-field filtering, and test suite.
- Added validators to Person_Base, Journal_Base, Journal_Entry_Base, Address_Base, and Contact_Base to handle null values and unsafe lookups. - Implemented 'fields_to_exclude_from_db' ClassVar in Journal models to prevent view-only fields from causing DB errors. - Updated Contact object map to align with DB schema. - Added comprehensive test suite in 'tests/' directory (model validation, filtering logic). - Updated GEMINI.md with progress.
This commit is contained in:
@@ -20,10 +20,10 @@
|
||||
"obj_enable_on": "NULL",
|
||||
"obj_archive_on": "NULL",
|
||||
"obj_restricted": "NULL",
|
||||
"obj_hide": "`verified`",
|
||||
"obj_priority": "NULL",
|
||||
"obj_sort": "NULL",
|
||||
"obj_group": "NULL",
|
||||
"obj_hide": "`hide`",
|
||||
"obj_priority": "`priority`",
|
||||
"obj_sort": "`sort`",
|
||||
"obj_group": "`group`",
|
||||
"obj_ver": "NULL",
|
||||
"obj_staff_notes": "NULL",
|
||||
"obj_data_json": "NULL",
|
||||
@@ -33,4 +33,4 @@
|
||||
"obj_notes": "NULL",
|
||||
"obj_created_on": "`created_on`",
|
||||
"obj_updated_on": "`updated_on`"
|
||||
}
|
||||
}
|
||||
@@ -20,8 +20,8 @@
|
||||
"obj_enable_on": "NULL",
|
||||
"obj_archive_on": "NULL",
|
||||
"obj_restricted": "NULL",
|
||||
"obj_hide": "NULL",
|
||||
"obj_priority": "NULL",
|
||||
"obj_hide": "`hide`",
|
||||
"obj_priority": "`priority`",
|
||||
"obj_sort": "`sort`",
|
||||
"obj_group": "`group`",
|
||||
"obj_ver": "NULL",
|
||||
@@ -30,7 +30,7 @@
|
||||
"obj_cfg_json": "NULL",
|
||||
"obj_meta_json": "NULL",
|
||||
"obj_other_json": "NULL",
|
||||
"obj_notes": "NULL",
|
||||
"obj_notes": "`notes`",
|
||||
"obj_created_on": "`created_on`",
|
||||
"obj_updated_on": "`updated_on`"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user