Skip to content

βœ” Update model inheritance project_management.ProjectStateΒ #831

Description

@jon-nfc

πŸ“‹ Switching Model Inheritance Checklist

  • Switch the inherited model to from core.models.centurion import CenturionModel

  • Add Model to dict in app/core/signal/centurion_model_migrate.py app_label, model_name, old_history, old_notes

  • Model Class:

    • Remove method save_history
    • Remove any field named:
      • id
      • model_notes
      • organization
      • created
      • πŸ’‘ run makemigrations just in case field(s) change

    • Refactor any logic in method save to be located in either clean or clean_fields
    • Remove the save method
    • Remove any delete method
    • Add Namespace to modules url_api.py uncomment app_name and ensure set to the module name
    • Update urlroute basename to format _api_<model_name>
  • History:

    • Remove Serializer
    • Remove History Tests
    • Add history model import to models/__init__.py
    • Migrate History
    • Remove History model
  • Notes:

    • Remove Serializer
    • Remove Notes Tests
    • Remove Notes URL Route
    • Remove Notes ViewSet
    • Add notes model import to models/__init__.py
    • Migrate Notes
    • Remove Notes Model
  • Remove imports that are un-used

  • Tests (Refactor All Tests to use PyTest not unittestΒ #729):

Metadata

Metadata

Assignees

Type

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions