Skip to content
Snippets Groups Projects
Commit 88f69753 authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

Merge branch 'collections-controller-update' into 'master'

Fix update error in extra_params

See merge request !331
parents 2fb0ab22 62bec799
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ class V1::CollectionsController < ApplicationController
# PUT/PATCH /v1/users/1.json
def update
if @collection.update(collection_params)
@collection.add_items(extra_params[:items])
@collection.add_items(extra_params[:items]) unless extra_params[:items].is_nil?
render json: @collection, status: :ok
else
render json: @collection.errors, status: :unprocessable_entity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment