aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorRobert2017-08-11 09:57:55 +0200
committerRobert2017-08-11 09:57:55 +0200
commit8eaa9249825f6eb6d667291fd9aa26bbde1ac7e3 (patch)
treedd79104c7b19f6ca8f2c6c1aebb77d0baf8a12d9 /app
parent70c04d2727179308e98d704c78a668c425b223b9 (diff)
downloadchouette-core-8eaa9249825f6eb6d667291fd9aa26bbde1ac7e3.tar.bz2
initial
Diffstat (limited to 'app')
-rw-r--r--app/controllers/api/v1/netex_imports_controller.rb3
-rw-r--r--app/services/http_service.rb2
-rw-r--r--app/workers/workbench_import_worker.rb2
3 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/api/v1/netex_imports_controller.rb b/app/controllers/api/v1/netex_imports_controller.rb
index 17eec2ef8..ba7777654 100644
--- a/app/controllers/api/v1/netex_imports_controller.rb
+++ b/app/controllers/api/v1/netex_imports_controller.rb
@@ -40,6 +40,9 @@ module Api
organisation_id: @workbench.organisation_id,
workbench_id: @workbench.id)
@new_referential.save!
+ # TODO: >>> REMOVE ME !!!!
+ ReferentialMetadataKludge.make_metadata_from_name! netex_import_params['name'], referential_id: @new_referential.id
+ # <<< REMOVE ME !!!!
rescue ActiveRecord::RecordInvalid
render json: {errors: @new_referential.errors}, status: 406
finish_action!
diff --git a/app/services/http_service.rb b/app/services/http_service.rb
index ae7d0e413..ceaa89b2f 100644
--- a/app/services/http_service.rb
+++ b/app/services/http_service.rb
@@ -39,6 +39,8 @@ module HTTPService extend self
params.update( name => Faraday::UploadIO.new(value, mime_type, as_name ) )
end
+ require 'pry'
+ binding.pry
return c.post path, params
end
end
diff --git a/app/workers/workbench_import_worker.rb b/app/workers/workbench_import_worker.rb
index 7f77b46dc..6fc709d51 100644
--- a/app/workers/workbench_import_worker.rb
+++ b/app/workers/workbench_import_worker.rb
@@ -45,6 +45,8 @@ class WorkbenchImportWorker
def try_upload_entry_group eg_name, eg_stream
result = execute_post eg_name, eg_stream
+ require 'pry'
+ binding.pry
return result if result && result.status < 400
@response = result.body
try_again