Skip to content

feat(Cantines): nouveau champ siren_unite_legale pour commencer à gérer les cantines sans SIRET propre #5081

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

Merged
merged 5 commits into from
Mar 5, 2025

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented Mar 3, 2025

Modifications apportées :

  • nouveau champ siren_unite_legale
  • rajout d'un validator + clean au moment du save
  • ajout de tests

self.check_siret_rules()
super(Canteen, self).save(force_insert, force_update, using, update_fields)

def check_siret_rules(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est plutôt le check dans l'autre sens qui me semble utile : si pas de SIRET alors SIREN obligatoire

A priori, ça ne pose pas de pbm d'avoir SIREN et SIRET (mais on en veut pas forcément non plus)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

le hic c'est que ca rajoute un nouveau check assez fort - l'obligation d'avoir un SIRET - qui n'est pas respecté par une ~40 aine de cantines en DB. est-ce qu'on veut rajouter cette règle ici et maintenant ? (mes premiers commit allaient dans ce sens, puis j'ai revert)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A priori, ça ne pose pas de pbm d'avoir SIREN et SIRET (mais on en veut pas forcément non plus)

ah ok !

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

j'ai enlevé les règles du coup ici : 535db2c

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

et j'ai ouvert une PR séparée - #5088 - pour rendre le SIRET obligatoire, mais ca peut venir après, une fois qu'on est sûr des impacts et tout et tout 😅

Base automatically changed from raphodn/backend-siret-refactor to staging March 4, 2025 10:52
@raphodn raphodn force-pushed the raphodn/backend-canteen-siren_unite_legale branch from 16bf35a to fd53cd8 Compare March 4, 2025 10:53
@raphodn raphodn requested a review from qloridant March 4, 2025 15:04
@raphodn raphodn merged commit b5c04b4 into staging Mar 5, 2025
7 checks passed
@raphodn raphodn deleted the raphodn/backend-canteen-siren_unite_legale branch March 5, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants