Éligibilité : Correction de durées de certification de critères administratifs incorrects - #6173
Merged
Merged
Conversation
There is bad data in the database, probably due to an earlier bug of the API particulier integration. ``` SELECT certified_at FROM eligibility_selectedadministrativecriteria WHERE certified AND certification_period IS NULL ORDER BY 1 DESC; ``` Reveals 1048 results, the latest on January 9th, 2025.
tonial
approved these changes
May 21, 2025
francoisfreitag
enabled auto-merge
May 21, 2025 07:37
francoisfreitag
added this pull request to the merge queue
May 21, 2025
francoisfreitag
commented
May 21, 2025
| crit.certified_at, crit.certified_at + datetime.timedelta(days=92) | ||
| ) | ||
| geiq.append(crit) | ||
| GEIQSelectedAdministrativeCriteria.objects.bulk_update(iae, fields=["certification_period"]) |
Member
Author
There was a problem hiding this comment.
Oops. Un diag geiq a été modifié par erreur. Je corrige.
Member
Author
There was a problem hiding this comment.
Ou plusieurs diags :'(
Member
Author
There was a problem hiding this comment.
Ou aucun 🍀, la requête suivante ne retourne aucun résultat sur une base qui contient bien les 1048 critères corrompus.
SELECT *
FROM eligibility_geiqselectedadministrativecriteria
WHERE id in (
SELECT id
FROM eligibility_selectedadministrativecriteria
WHERE certified AND certification_period IS NULL
);
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 ?
Il y a des données invalides dans la base de données.
donne 1048 resultats, le plus récent date du 9 janvier 2025.
https://inclusion.sentry.io/issues/42627599/?project=4508410589020240&referrer=github-pr-bot