Fix geographic filter causing false-by-1 count of deleted objects#5202
Draft
marcantoinedupre wants to merge 1 commit intomasterfrom
Draft
Fix geographic filter causing false-by-1 count of deleted objects#5202marcantoinedupre wants to merge 1 commit intomasterfrom
marcantoinedupre wants to merge 1 commit intomasterfrom
Conversation
When applied on a new (not saved yet) object the geographic filter caused None to be added to `self.to_delete`. As a consequence import's report count of deleted records would be off by 1. In particular it would always show 1 deleted recording even for a parser running for the 1st time (where a deleted recording is unexpected).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5202 +/- ##
========================================
Coverage 98.47% 98.47%
========================================
Files 272 272
Lines 22271 22390 +119
========================================
+ Hits 21931 22049 +118
- Misses 340 341 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Geotrek-admin
|
||||||||||||||||||||||||||||
| Project |
Geotrek-admin
|
| Branch Review |
refs/pull/5202/merge
|
| Run status |
|
| Run duration | 02m 03s |
| Commit |
|
| Committer | Marc-Antoine Dupré |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
22
|
| View all changes introduced in this branch ↗︎ | |
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.
Le filtre géographique de
Parserbasé surintersection_geomajoutaitNoneàself.to_deletedans le cas d'un nouvel objet (carself.obj.pkvautNonetant que l'objet n'a pas été saved, ce qui intervient plus tard dans le processus d'import).En conséquence le compte d'objets supprimés dans le rapport d'import pouvait être faux de +1 si un ou plusieurs nouveaux objets se trouvant en-dehors de
intersection_geomavaient été parsés.En particulier la sortie d'un import avec un parser n'ayant pas encore été exécuté indiquait toujours « Enregistrement supprimé : 1 » ce qui est impossible.
Related Issue
Checklist