Skip to content

Commit 38ab554

Browse files
authored
Merge pull request snabbco#1010 from Igalia/property-based-tests-redux
Property based tests redux
2 parents ddaed84 + cf61265 commit 38ab554

File tree

2 files changed

+203
-197
lines changed

2 files changed

+203
-197
lines changed

src/lib/yang/data.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ function data_grammar_from_schema(schema, is_config)
181181
function handlers.choice(node)
182182
local choices = {}
183183
for choice, n in pairs(node.body) do
184-
choices[choice] = visit_body(n)
184+
local members = visit_body(n)
185+
if not is_empty(members) then choices[choice] = members end
185186
end
186187
if is_empty(choices) then return end
187188
return {type="choice", default=node.default, mandatory=node.mandatory,

0 commit comments

Comments
 (0)