diff options
| author | Alban Peignier | 2017-08-28 09:31:47 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2017-08-28 09:31:47 +0200 | 
| commit | 232f3413b433f404aadfa5a18fab1b2493d6f00d (patch) | |
| tree | dcc814457ddc0b2629318ab578582de4720bf78d /app/controllers/api | |
| parent | f1e26dbe3c8d5b6fdb970e98de4d5490f9e4e63c (diff) | |
| download | chouette-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.rb | 5 | 
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  | 
