psu-libraries / scholarsphere

Penn State's next generation institutional repository
MIT License
12 stars 6 forks source link

fix draft_curation_request bug #1505

Closed Smullz622 closed 6 months ago

Smullz622 commented 7 months ago

During the go script work, I realized users could still publish after requesting draft curation. By setting draft_curation_requested to false in the ensure block, it could never update to true & buttons for publish & request curation were always rendered. If I remember correctly, the initial idea for having it there was for error handling, but I think rescuing the CurationError does an adequate job of handling that scenario.

EricDurante commented 6 months ago

It might be a good idea to test that the boolean gets set properly in here: https://github.com/psu-libraries/scholarsphere/blob/main/spec/features/dashboard/work_version_form_spec.rb#L1148-L1158 . There's a lot of logic in this controller, so we should try to cover as much of it as possible somewhere.

+1