Skip to content
Snippets Groups Projects
Commit 6a6996d4 authored by lmtd21's avatar lmtd21
Browse files

Issue #34: FIX learning object link

parent 6954794d
No related branches found
No related tags found
1 merge request!33Issue #34: FIX learning object link
Pipeline #32234 failed
...@@ -178,9 +178,6 @@ class V1::LearningObjectsController < ApplicationController ...@@ -178,9 +178,6 @@ class V1::LearningObjectsController < ApplicationController
learning_object.add_subjects(ids: params[:subjects]) unless params[:subjects].nil? learning_object.add_subjects(ids: params[:subjects]) unless params[:subjects].nil?
#learning_object.add_educational_stages(ids: extra_params[:educational_stages]) unless extra_params[:educational_stages].nil? #learning_object.add_educational_stages(ids: extra_params[:educational_stages]) unless extra_params[:educational_stages].nil?
if change_object_type_id
learning_object.link = nil
end
end end
def update_learning_object_associations(learning_object, change_object_type_id=false) def update_learning_object_associations(learning_object, change_object_type_id=false)
...@@ -188,9 +185,6 @@ class V1::LearningObjectsController < ApplicationController ...@@ -188,9 +185,6 @@ class V1::LearningObjectsController < ApplicationController
learning_object.update_subjects(ids: extra_params[:subjects].map {|s| s.to_i}) unless extra_params[:subjects].nil? learning_object.update_subjects(ids: extra_params[:subjects].map {|s| s.to_i}) unless extra_params[:subjects].nil?
learning_object.update_educational_stages(ids: extra_params[:educational_stages].map {|es| es.to_i}) unless extra_params[:educational_stages].nil? learning_object.update_educational_stages(ids: extra_params[:educational_stages].map {|es| es.to_i}) unless extra_params[:educational_stages].nil?
if change_object_type_id
learning_object.link = nil
end
end end
def authorize! def authorize!
......
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