Commit b107f65b authored by Philippe's avatar Philippe

fix zip format

parent f00e339e
......@@ -12,7 +12,7 @@ function M.section(form)
local o = s:option(cbi.Value, "_zip", fieldlabel)
o.value = uci:get_first("gluon-node-info", "location", "zip")
o.rmempty = true
o.datatype = "float"
o.datatype = "uinteger"
o.description = i18n.translatef("e.g. %s", "70499")
end
......
......@@ -51,13 +51,7 @@ static struct json_object * get_number(struct uci_context *ctx, struct uci_secti
if (!val || !*val)
return NULL;
char *end;
double d = strtod(val, &end);
if (*end)
return NULL;
struct json_object *jso = json_object_new_double(d);
json_object_set_serializer(jso, json_object_double_to_json_string, "%.8f", NULL);
struct json_object *jso = json_object_new_string(val);
return jso;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment