Skip to content
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

DCC Bug 711 - Fix for broken creation of a Plan using the V0 API. #3135

Merged
merged 4 commits into from
Mar 31, 2022

Conversation

johnpinto1
Copy link
Contributor

Issue fixed DCC bug for /api/v0/plans for creating a Plan given a
template id https://github.com/DigitalCurationCentre/DMPonline-Service/issues/711

Changes:

  • in app/controllers/api/v0/base_controller.rb: added strong
    parameters function plan_params.
  • in app/controllers/api/v0/plans_controller.rb: in method create()
    added
    @plan.org = @user.org
    and
    replaced
    @plan.assign_creator(plan_user)
    by
    @plan.add_user!(plan_user.id, :creator).

Issue fixed DCC bug for /api/v0/plans for creating a Plan given a
template id https://github.com/DigitalCurationCentre/DMPonline-Service/issues/711

Changes:
  - in app/controllers/api/v0/base_controller.rb: added strong
parameters function plan_params.
  - in app/controllers/api/v0/plans_controller.rb: in method create()
added
  @plan.org = @user.org
and
 replaced
    @plan.assign_creator(plan_user)
 by
    @plan.add_user!(plan_user.id, :creator).
@briri briri merged commit 3e2e2e7 into development Mar 31, 2022
@briri briri deleted the dcc_bug_711-Creating_plans_using_V0_Rest_API branch March 31, 2022 15:46
@briri briri mentioned this pull request Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants