diff Core/JobsEngine/GenericJobUnserializer.cpp @ 2652:a3f0f61a14ca jobs

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 04 Jun 2018 12:36:24 +0200
parents e1893d31652a
children c196d76cb8fa
line wrap: on
line diff
--- a/Core/JobsEngine/GenericJobUnserializer.cpp	Mon Jun 04 11:53:12 2018 +0200
+++ b/Core/JobsEngine/GenericJobUnserializer.cpp	Mon Jun 04 12:36:24 2018 +0200
@@ -43,9 +43,9 @@
 
 namespace Orthanc
 {
-  IJob* GenericJobUnserializer::UnserializeJob(const std::string& type,
-                                               const Json::Value& source)
+  IJob* GenericJobUnserializer::UnserializeJob(const Json::Value& source)
   {
+    const std::string type = GetString(source, "Type");
 
     LOG(ERROR) << "Cannot unserialize job of type: " << type;
     throw OrthancException(ErrorCode_BadFileFormat);