Skip to content

GPS: Empêcher les relations en double#5868

Merged
tonial merged 1 commit into
masterfrom
alaurent/gps_constraint
Apr 7, 2025
Merged

GPS: Empêcher les relations en double#5868
tonial merged 1 commit into
masterfrom
alaurent/gps_constraint

Conversation

@tonial

@tonial tonial commented Apr 2, 2025

Copy link
Copy Markdown
Contributor

🤔 Pourquoi ?

Pour empêcher louis-jean de créer des relations en double dans l'admin

https://www.notion.so/gip-inclusion/Emp-cher-les-relations-en-double-1c85f321b6048083bf4ad3c708ef8157?pvs=4

🍰 Comment ?

Ajout d'un unique_together

🚨 À vérifier

  • Mettre à jour le CHANGELOG_breaking_changes.md ?
  • Ajouter l'étiquette « Bug » ?

🏝️ Comment tester ?

Se connect à l'admin, prendre une relation GPS existante (http://127.0.0.1:8000/admin/gps/followupgroupmembership/)
et en ajouter une avec le même groupe et le même membre.
Un message d'erreur s'affiche et l'objet n'est pas créé.

Les instructions pour reproduire le problème, les profils de test, le parcours spécifique à utiliser, etc. Si vous disposez d'une recette jetable, mettre l'URL pour tester dans cette partie.

💻 Captures d'écran

@tonial tonial added the modifié Modifié dans le changelog. label Apr 2, 2025
@tonial tonial self-assigned this Apr 2, 2025
@tonial tonial changed the base branch from master to alaurent/gps_new_advisor_file April 2, 2025 19:43
@tonial tonial force-pushed the alaurent/gps_new_advisor_file branch 2 times, most recently from e10cef7 to 4a09d35 Compare April 2, 2025 19:44
@tonial tonial force-pushed the alaurent/gps_constraint branch from 96c435d to 53ed1c0 Compare April 2, 2025 19:44
Comment thread itou/gps/migrations/0022_alter_followupgroupmembership_unique_together.py Outdated
Comment thread itou/gps/migrations/0022_alter_followupgroupmembership_unique_together.py Outdated
@tonial tonial force-pushed the alaurent/gps_constraint branch from 53ed1c0 to 8c1f634 Compare April 3, 2025 09:08
@tonial tonial requested a review from francoisfreitag April 3, 2025 09:10
@tonial tonial force-pushed the alaurent/gps_new_advisor_file branch from 4a09d35 to 286dcc4 Compare April 3, 2025 09:10
@tonial tonial force-pushed the alaurent/gps_constraint branch from 8c1f634 to d353b39 Compare April 3, 2025 09:25
@tonial tonial force-pushed the alaurent/gps_new_advisor_file branch from 286dcc4 to 672dc9b Compare April 3, 2025 09:25
Comment thread tests/gps/test_admin.py Outdated
Comment thread tests/gps/test_admin.py Outdated

@francoisfreitag francoisfreitag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Le commit fixup! gps: Add management command for new advisor file était pour une autre PR non ?

Comment thread itou/gps/migrations/0022_alter_followupgroupmembership_unique_together.py Outdated
@tonial tonial force-pushed the alaurent/gps_new_advisor_file branch 2 times, most recently from 7fab38a to c0c7002 Compare April 3, 2025 10:00
@tonial tonial force-pushed the alaurent/gps_constraint branch from d353b39 to 65eca74 Compare April 3, 2025 10:00
@tonial

tonial commented Apr 3, 2025

Copy link
Copy Markdown
Contributor Author

@francoisfreitag oui, pour une PR en dessous (j'en ai encore 4 qui se suivent 🙈 )

@tonial tonial force-pushed the alaurent/gps_constraint branch 2 times, most recently from 5648c02 to 4308797 Compare April 3, 2025 13:15
@francoisfreitag

Copy link
Copy Markdown
Member

Plus je regarde cette PR, plus elle a de commits 😨

@tonial tonial force-pushed the alaurent/gps_new_advisor_file branch from c0c7002 to 05aa292 Compare April 3, 2025 13:18
@tonial

tonial commented Apr 3, 2025

Copy link
Copy Markdown
Contributor Author

C'est bon, je viens de repusher toutes les PR d'en dessous 👼

@tonial

tonial commented Apr 3, 2025

Copy link
Copy Markdown
Contributor Author

C'est cool le git rebase -i master --update-refs --autosquash mais il me manque la commande pour pousser toutes les branches concernées par le --update-refs

@tonial tonial force-pushed the alaurent/gps_new_advisor_file branch from 05aa292 to 7e51cca Compare April 3, 2025 14:02
@tonial tonial force-pushed the alaurent/gps_constraint branch from 4308797 to 2850359 Compare April 3, 2025 14:02
@tonial tonial force-pushed the alaurent/gps_new_advisor_file branch from 7e51cca to f7b00c1 Compare April 3, 2025 14:36
@tonial tonial force-pushed the alaurent/gps_constraint branch 2 times, most recently from 982c8b1 to dbb1a85 Compare April 3, 2025 14:41
@tonial tonial force-pushed the alaurent/gps_new_advisor_file branch from f7b00c1 to 74fe84a Compare April 3, 2025 14:41
@tonial tonial force-pushed the alaurent/gps_constraint branch from dbb1a85 to d27ed4c Compare April 3, 2025 15:10
@tonial tonial force-pushed the alaurent/gps_new_advisor_file branch 2 times, most recently from b775829 to ebbf16f Compare April 3, 2025 15:16
@tonial tonial force-pushed the alaurent/gps_constraint branch from d27ed4c to 5c27be7 Compare April 3, 2025 15:16
@tonial tonial force-pushed the alaurent/gps_new_advisor_file branch from ebbf16f to 7cd9976 Compare April 7, 2025 09:15
Base automatically changed from alaurent/gps_new_advisor_file to master April 7, 2025 09:58
This is to prevent our admin from creating a membership that already exists

There are 80 duplicated memberships, hence the script to clean
duplicates
@tonial tonial force-pushed the alaurent/gps_constraint branch from 5c27be7 to 2f47b9b Compare April 7, 2025 10:03
@tonial tonial enabled auto-merge April 7, 2025 10:04
@tonial tonial added this pull request to the merge queue Apr 7, 2025
Merged via the queue into master with commit 207ddc4 Apr 7, 2025
@tonial tonial deleted the alaurent/gps_constraint branch April 7, 2025 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modifié Modifié dans le changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants