Closed EdoStorm96 closed 1 year ago
Ok, so I decided to also incorporate a fix for #491 here. I hope this PR is not getting too messy for you both ...
491:
So this alters how the avg_understood
field works. It is now nullable, the widget for it has changed to a radioselect button, and it can be either yes or no, but not be left blank. This field is now also displayed in the pdf & diff.
I did run into one issue here ... The AVGUnderstoodValidator
function (the logic of which I updated in line with the field's new requirements) was seemingly not doing anything for me, so I tried removing it entirely. This seems to not be possible, when making migrations. So now it is just there, but not really doing anything? I created an error message in the form's clean
method, which works fine, but could/should I remove the validator? Or is it best to keep it and get rid of my new error message? I did not really see the purpose of this validator ...
One last thing: you only added the is_committee_review
variable. It would be nice if a app-wide pass was made to actually use it in QuerySets over the old annoying method
Ok, so I implemented the changes you both requested, some notes:
Review.update_go()
method as Michael suggested to close supervisor reviews. I now use this method on all past reviews in the data migration, to update their stage when relevant. See review migration 0013.avg_understood
with privacy_officer
, as Ty suggested. This does indeed make more sense.AVGUnderstoodValidator
I removed it and all references to it from the repo. However, this caused a problem, because it got referenced in proposal migration 0034. As suggested in the Django docs, I just placed this function in this migration (as an empty function) and now all seems to work fine. (Despite this solution looking shady to me ...)All right, so I've implemented Ty's minor tweaks, but, more importantly, I realized that it should be is_committee_review
and not is_commission_review
. This is a typo that occurred when discussing the original issue (#350) and was then adopted in this discussion and also by me ;p I re-ran the migrations on my branch, so that there is no evidence of this. I think it should be all good now!
This PR fixes #350, #575 and #578.
is_commission_review
field to theReview
model, so that there is a simple check to see if a review is a supervisor review, besides the stage. Some things to note:True
, only get changed when creating a supervisor review.578: Added Chamber information to the PDF header. Right now, just using the acronyms, as this was requested by Desiree. It now looks like this, at the top of the page:
'FEtC-H - _Looking at the elderlyrev (reference number 23-019-01, submitted by Justin Bieber) - LC'
The code in the template is a bit ugly ... I was kindoff struggling with keeping the chamber name translatable, but IMO this is fine.