Skip to content
Snippets Groups Projects
Commit b107f65b authored by Philippe's avatar Philippe
Browse files

fix zip format

parent f00e339e
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment