aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/api
diff options
context:
space:
mode:
authorAlban Peignier2017-08-28 09:31:47 +0200
committerAlban Peignier2017-08-28 09:31:47 +0200
commit232f3413b433f404aadfa5a18fab1b2493d6f00d (patch)
treedcc814457ddc0b2629318ab578582de4720bf78d /app/controllers/api
parentf1e26dbe3c8d5b6fdb970e98de4d5490f9e4e63c (diff)
downloadchouette-core-232f3413b433f404aadfa5a18fab1b2493d6f00d.tar.bz2
Define Import#creator even if referential isn't created. Refs #4273
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/netex_imports_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/api/v1/netex_imports_controller.rb b/app/controllers/api/v1/netex_imports_controller.rb
index cb863b9fc..046802ff9 100644
--- a/app/controllers/api/v1/netex_imports_controller.rb
+++ b/app/controllers/api/v1/netex_imports_controller.rb
@@ -28,9 +28,10 @@ module Api
end
def create_netex_import
- attributes = netex_import_params
+ attributes = netex_import_params.merge creator: "Webservice"
+
if @new_referential.persisted?
- attributes = attributes.merge referential_id: @new_referential.id, creator: "Webservice"
+ attributes = attributes.merge referential_id: @new_referential.id
else
attributes = attributes.merge status: "failed"
end