Skip to content

Commit

Permalink
Ensure in json-ietf the Containers with Presence are shown.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseIgnacioTamayo committed Jul 11, 2024
1 parent 52e592b commit ac6b8db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyangbind/lib/serialise.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ def generate_ietf_tree(obj, parent_namespace=None, flt=False, with_defaults=None
d[yname] = generate_ietf_tree(
element, parent_namespace=element._namespace, flt=flt, with_defaults=with_defaults
)
if not len(d[yname]):
present = getattr(element, "_cpresent", False)
if not len(d[yname]) and not present:
del d[yname]
elif generated_by == "YANGListType":
d[yname] = [
Expand Down

0 comments on commit ac6b8db

Please sign in to comment.