Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🗃️(dashboard) refactor DeliveryPoint and Entity models #243

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

ssorin
Copy link
Collaborator

@ssorin ssorin commented Nov 26, 2024

Purpose

The models were missing a relationship to know the owner of a delivery point.

Update

  • Replaced entities ManyToMany relationship with a ForeignKey in DeliveryPoint.
  • Added proxy_for ManyToManyField in Entity on itself.
  • Introduced slug field for Entity.
  • Rename DeliveryPoint.provider_id to DeliveryPoint.provider_assigned_id
  • Enhanced model tests for new relationships and integrity checks.
  • We now use a django-extension feature in templates. django-extension is now a standard package.

Important note

Entity and DeliveryPoint migrations have been reset. A db reset is therefore mandatory

@ssorin ssorin self-assigned this Nov 26, 2024
@ssorin ssorin added feature improvement needs review dashboard Item related to the Dashboard service labels Nov 26, 2024
@ssorin ssorin force-pushed the feature/dashboard/update-models branch from dbac46b to 1246eba Compare November 26, 2024 15:40
@ssorin ssorin requested a review from jmaupetit November 26, 2024 15:42
@jmaupetit jmaupetit marked this pull request as ready for review November 26, 2024 16:14
- Replaced `entities` ManyToMany relationship with a ForeignKey in DeliveryPoint.
- Introduced slug field for Entity.
- Added `proxy_for` ManyToManyField in Entity on itself.
- Enhanced model tests for new relationships and integrity checks.
- Rename DeliveryPoint.provider_id to DeliveryPoint.provider_assigned_id
- Reset Entity and DeliveryPoint migrations
- update pipenv
@ssorin ssorin force-pushed the feature/dashboard/update-models branch from 1246eba to e64a65c Compare November 26, 2024 16:49
@ssorin ssorin merged commit b2704f2 into main Nov 28, 2024
20 of 21 checks passed
@ssorin ssorin deleted the feature/dashboard/update-models branch November 28, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard Item related to the Dashboard service feature improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants