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

Work around Element sending order as strings

parent 188ecb89
Branches reportContent
No related tags found
No related merge requests found
Pipeline #5674 failed
......@@ -11,8 +11,9 @@ namespace account_data {
void
from_json(const json &obj, Tag &content)
{
if (obj.contains("order"))
content.order = obj.at("order").get<double>();
// Workaround some Element clients sending order as strings...
if (auto o = obj.find("order"); o != obj.end() && o->is_number())
content.order = o->get<double>();
}
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