aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/referentials_controller.rb
diff options
context:
space:
mode:
authorXinhui2016-11-07 12:25:19 +0100
committerXinhui2016-11-07 12:25:34 +0100
commit41b372edabe354d6ada486fe67de54e32e9cbe76 (patch)
tree21d7db8177c6e30ec37282ba3f5e6a969b763cb5 /app/controllers/referentials_controller.rb
parent447f70f378ae430092090a66d40fe99ee1149b64 (diff)
downloadchouette-core-41b372edabe354d6ada486fe67de54e32e9cbe76.tar.bz2
Refactoring referential cloning associations
Refs #1863
Diffstat (limited to 'app/controllers/referentials_controller.rb')
-rw-r--r--app/controllers/referentials_controller.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb
index 3ae59f975..003c85d3a 100644
--- a/app/controllers/referentials_controller.rb
+++ b/app/controllers/referentials_controller.rb
@@ -57,11 +57,7 @@ class ReferentialsController < BreadcrumbController
end
def create_resource(referential)
- if referential.created_from
- referential.clone_association referential.created_from
- else
- referential.organisation = current_organisation
- end
+ referential.organisation = current_organisation unless referential.created_from
super
end