-
Notifications
You must be signed in to change notification settings - Fork 92
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
Tech: utilise des colonnes id dans les ProcedurePresentation
#10850
Conversation
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: app/models/procedure_presentation.rb
Did you find this useful? React with a 👍 or 👎 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10850 +/- ##
==========================================
+ Coverage 84.68% 84.69% +0.01%
==========================================
Files 1130 1130
Lines 25060 25082 +22
Branches 4704 4706 +2
==========================================
+ Hits 21221 21243 +22
Misses 3839 3839 ☔ View full report in Codecov by Sentry. |
app/models/procedure_presentation.rb
Outdated
updated_filtered_columns = filtered_columns.dup | ||
updated_filtered_columns[statut] << { id: column_id, filter: value } | ||
|
||
update(filters: updated_filters, filtered_columns: updated_filtered_columns) |
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.
pourquoi t'a besoin de continuer d'écrire dans filters
?
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.
Ah, tu implémenteras que le write ici et le read sera implémenté dans une autre PR ? Donc pour l'instant, tu as besoin des deux, c'est ça ?
010cda2
to
e449a94
Compare
07dadb2
to
74bb542
Compare
because: - id should be a string as other id - id need procedure_id to allow ColumnType.deserialize(id) -> Column as the columns are built by a procedure
74bb542
to
d5a722c
Compare
presentation.filters.each do |key, filters| | ||
raw_columns = filters.map do | ||
{ | ||
id: make_id(procedure_id, _1['table'], _1['column']), | ||
filter: _1['value'] | ||
} | ||
end | ||
|
||
presentation.send("#{presentation.filters_name_for(key)}=", raw_columns) | ||
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.
yeap, le backfill est OK
No description provided.