msggen: Don't assume we have properties in the schema

This commit is contained in:
Christian Decker
2022-04-01 15:08:55 +02:00
committed by Rusty Russell
parent 5a1e58f0dc
commit be04f25666

View File

@@ -100,7 +100,7 @@ class CompositeField(Field):
def from_js(cls, js, path):
typename = path2type(path)
properties = js["properties"]
properties = js.get("properties", {})
# Ok, let's flatten the conditional properties. We do this by
# reformatting the outer conditions into the `allOf` format.
top = {