Mercurial > prosody-hg
diff util/datamapper.lua @ 11461:766b0eddd12c
util.datamapper: Deal with type name changes in util.jsonschema
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 19 Mar 2021 00:26:04 +0100 |
| parents | 0e00fa518688 |
| children | d1982b7eb00d |
line wrap: on
line diff
--- a/util/datamapper.lua Thu Mar 18 23:57:03 2021 +0100 +++ b/util/datamapper.lua Fri Mar 19 00:26:04 2021 +0100 @@ -82,7 +82,7 @@ function parse_object(schema, s) local out = {} - if schema.properties then + if type(schema) == "table" and schema.properties then for prop, propschema in pairs(schema.properties) do local proptype, value_where, name, namespace, prefix, single_attribute, enums = unpack_propschema(propschema, prop, s.attr.xmlns)
