-
Notifications
You must be signed in to change notification settings - Fork 91
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
Champ related cleanups and refactoring #10711
Champ related cleanups and refactoring #10711
Conversation
21c621f
to
f342610
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10711 +/- ##
=======================================
Coverage 84.58% 84.58%
=======================================
Files 1118 1118
Lines 24770 24753 -17
Branches 4609 4611 +2
=======================================
- Hits 20952 20938 -14
+ Misses 3818 3815 -3 ☔ View full report in Codecov by Sentry. |
82bc57b
to
94bd4de
Compare
app/models/attestation_template.rb
Outdated
champs_by_stable_id = dossier.revision.types_de_champ.index_by { "tdc#{_1.stable_id}" } | ||
|
||
used_tags.filter_map do |used_tag| | ||
corresponding_champ = champs_by_stable_id[used_tag] | ||
corresponding_type_de_champ = champs_by_stable_id[used_tag] | ||
|
||
if corresponding_champ && corresponding_champ.blank? | ||
corresponding_champ | ||
if corresponding_type_de_champ && dossier.project_champ(corresponding_type_de_champ, nil).blank? | ||
corresponding_type_de_champ | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ça me chagrine ce changement, on renvoyait des champs, maintenant des types de champs. isolé dans ce seul commit, je crains que nous cassions un appel venant d'un appelant, je sais pas dire si le code appelant est testé ac ce cas, mais se serait top d'ajouter un test la dessus non (ou clarifier le nommage)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il y a un seul usage de ce code dans l'app et on s'en sert seulement des méthodes libelle
et private?
sur les objets renvoyés
051ba86
to
79c9784
Compare
7b4d1e4
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
No description provided.