diff options
author | AGaliuzov <AGaliuzov@luxoft.com> | 2015-10-28 17:01:31 +0200 |
---|---|---|
committer | AGaliuzov <AGaliuzov@luxoft.com> | 2015-10-28 17:01:31 +0200 |
commit | 0a9c4806432701c77bb5260f5451f6e5f0551259 (patch) | |
tree | 2379dbbb8430ebf0d92a42cb4b7d7d506c43a5d0 | |
parent | 2cba968c81f8ab0cfeebba2783023dd867240b8c (diff) | |
parent | 6ff2f0238f06a0a2d1cf0d8b2d8463192145c5c1 (diff) | |
download | sdl_core-0a9c4806432701c77bb5260f5451f6e5f0551259.tar.gz |
Merge pull request #252 from LuxoftSDL/hotfix/Fix-ModuleConfig-initialization
Change type of `certificate` field to TEXT
-rw-r--r-- | src/components/policy/src/policy/src/sql_pt_queries.cc | 2 | ||||
-rw-r--r-- | src/components/policy/src/policy/src/sql_pt_representation.cc | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/components/policy/src/policy/src/sql_pt_queries.cc b/src/components/policy/src/policy/src/sql_pt_queries.cc index b7b82fe1da..d22cf4db8c 100644 --- a/src/components/policy/src/policy/src/sql_pt_queries.cc +++ b/src/components/policy/src/policy/src/sql_pt_queries.cc @@ -72,7 +72,7 @@ const std::string kCreateSchema = " `exchange_after_x_kilometers` INTEGER NOT NULL, " " `exchange_after_x_days` INTEGER NOT NULL, " " `timeout_after_x_seconds` INTEGER NOT NULL, " - " `certificate` INTEGER NOT NULL, " + " `certificate` TEXT, " " `vehicle_make` VARCHAR(45), " " `vehicle_model` VARCHAR(45), " " `vehicle_year` VARCHAR(4) " diff --git a/src/components/policy/src/policy/src/sql_pt_representation.cc b/src/components/policy/src/policy/src/sql_pt_representation.cc index 202eaf70f0..d0de201097 100644 --- a/src/components/policy/src/policy/src/sql_pt_representation.cc +++ b/src/components/policy/src/policy/src/sql_pt_representation.cc @@ -1065,13 +1065,13 @@ bool SQLPTRepresentation::SaveModuleConfig( query.Bind(2, config.exchange_after_x_kilometers); query.Bind(3, config.exchange_after_x_days); query.Bind(4, config.timeout_after_x_seconds); - query.Bind(5, config.certificate); + query.Bind(5, (*config.certificate)); config.vehicle_make.is_initialized() ? - query.Bind(6, *(config.vehicle_make)) : query.Bind(5); + query.Bind(6, *(config.vehicle_make)) : query.Bind(6); config.vehicle_model.is_initialized() ? - query.Bind(7, *(config.vehicle_model)) : query.Bind(6); + query.Bind(7, *(config.vehicle_model)) : query.Bind(7); config.vehicle_year.is_initialized() ? - query.Bind(8, *(config.vehicle_year)) : query.Bind(7); + query.Bind(8, *(config.vehicle_year)) : query.Bind(8); if (!query.Exec()) { LOG4CXX_WARN(logger_, "Incorrect update module config"); |