packs: Fix blacklist option bool assumption (#4400)

This commit is contained in:
Teddy Reed 2018-05-18 06:58:59 -04:00 committed by Filipe Manco
parent b4c7abb2b8
commit 201dd6d940

View File

@ -221,9 +221,11 @@ void Pack::initialize(const std::string& name,
} else {
query.options["removed"] = JSON::valueToBool(q.value["removed"]);
}
query.options["blacklist"] = (q.value.HasMember("blacklist"))
? q.value["blacklist"].GetBool()
: true;
query.options["blacklist"] = true;
if (q.value.HasMember("blacklist")) {
query.options["blacklist"] = JSON::valueToBool(q.value["blacklist"]);
}
schedule_.emplace(std::make_pair(q.name.GetString(), std::move(query)));
}