Skip to content
Snippets Groups Projects
Verified Commit 26983cb5 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Make policy rule parsing laxer

parent ad30236b
No related branches found
No related tags found
No related merge requests found
Pipeline #3351 passed
......@@ -6,9 +6,9 @@ namespace mtx::events::state::policy_rule {
void
from_json(const nlohmann::json &obj, Rule &rule)
{
rule.entity = obj.at("entity").get<std::string>();
rule.recommendation = obj.at("recommendation").get<std::string>();
rule.reason = obj.at("reason").get<std::string>();
rule.entity = obj.value("entity", "");
rule.recommendation = obj.value("recommendation", "");
rule.reason = obj.value("reason", "");
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment