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:
Scott Idem
2026-01-09 15:36:28 -05:00
parent 29b4d5ae4b
commit 1c0922ace2
11 changed files with 472 additions and 17 deletions

View File

@@ -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`"
}
}

View File

@@ -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`"
}
}