Browse Source

fixed bug where tasks needed unnecessary parameters to be considered ready

logicp 4 years ago
parent
commit
dc72fd2438
1 changed files with 4 additions and 8 deletions
  1. 4 8
      src/generic_task.cpp

+ 4 - 8
src/generic_task.cpp

@@ -250,14 +250,10 @@ const QVector<Scheduler::KFileData> GenericTask::getFiles() {
  *                      perform the task have been met.
  */
 bool GenericTask::isReady() {
-  auto header_size = std::get<VariantIndex::QSTRING>(getTaskArgumentValue("header")).size();
-  auto description_size = std::get<VariantIndex::QSTRING>(getTaskArgumentValue("description")).size();
-  auto datetime_size = std::get<VariantIndex::QSTRING>(getTaskArgumentValue("datetime")).size();
-  auto hasFiles = std::get<VariantIndex::FILEVEC>(getTaskArgumentValue("files")).size();
-  auto user_size = std::get<VariantIndex::QSTRING>(getTaskArgumentValue("user")).size();
-
-  return header_size > 0 && description_size > 0 && datetime_size > 0 &&
-         hasFiles && user_size > 0;
+  return std::get<VariantIndex::QSTRING>(
+    getTaskArgumentValue("datetime")
+  ) // GenericTask only needs a datetime value to run
+  .size() > 0;
 }
 
 /**