GPS: Correction du retrait d'un groupe#5646
Merged
Merged
Conversation
9cf2b31 to
d89d055
Compare
0bbecd0 to
7b93772
Compare
7b93772 to
df09a65
Compare
Contributor
|
Est-ce que ça ne serait pas plus propre d'utiliser un flag |
Contributor
Author
|
On travaille sur le sujet de la visibilité pour après, donc on va probablement modifier encore le comportement de is_active (possiblement avec 2 champs : |
leo-naeka
approved these changes
Feb 20, 2025
| def fill_ended_at(apps, schema_editor): | ||
| FollowUpGroupMembership = apps.get_model("gps", "FollowUpGroupMembership") | ||
|
|
||
| # There are less thant 10000 objects to update, no need to make batches here |
Contributor
There was a problem hiding this comment.
Suggested change
| # There are less thant 10000 objects to update, no need to make batches here | |
| # There are less than 10000 objects to update, no need to make batches here |
We want to use is_active to hide specific membership (such as SPIP members). Unfollowing a beneficiary should be done with ended_at field. TODO: - follow_beneficiary should not set is_active=True, but maybe set ended_at=None (wait for confirmation)
df09a65 to
131df59
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 Pourquoi ?
On liste à nouveau les anciens groupes d'un utilisateur dans un onglet séparé.

On souhaite de plus lui permettre (dans une PR à venir) de modifier les dates de suivi pour arrêter de suivre un groupe.
Le champ
is_activeva en revanche continuer à être utilisé pour masquer des memberships (par exemple celles du SPIP) en attendant de gérer les permissions de visibilité.Il n'y a que ~10000k objects concernés par la migration en prod, pas besoin de faire par batch
🍰 Comment ?
🚨 À vérifier
🏝️ Comment tester ?
💻 Captures d'écran