Skip to content

Refactored repository and database to improve integrity and clarity

Sam Kagan requested to merge STT-1144-repository-error-messages into main

Specifically:

  • Added a unique constraints on
    • capabilities for (facility_id, name)
    • target_overrides for (spectral_spec_name, field_source_name, capability_request_id)
    • target_override_values for (target_override_id, name)
    • scans for (position_in_list, observation_specification_id)
  • Updated add_entity to raise a ValueError with a nice message instead of an IntegrityError
    • Got rid of some 500 errors in the API as a result
  • Added Sphinx-compliant docstrings to ORM repo helpers
  • Refactored ORM repo helpers' type hints and parameter names to be more flexible and descriptive
Edited by Sam Kagan

Merge request reports