Skip to content

Commit

Permalink
Correctly add missing values when adding defaults
Browse files Browse the repository at this point in the history
Previously the tree passed in always had empty nodes
for values due to apteryx_query behaviour. Now it
is possible for the value to be NULL and this code is
hit but did not work. It has been fixed.
  • Loading branch information
carlgsmith committed Oct 24, 2023
1 parent 8357a59 commit 9cc63ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion schema.c
Original file line number Diff line number Diff line change
Expand Up @@ -3345,7 +3345,7 @@ _sch_traverse_nodes (sch_node * schema, GNode * parent, int flags)
/* Add missing values */
else if (!APTERYX_HAS_VALUE (child))
{
APTERYX_NODE (child->children, value);
APTERYX_NODE (child, value);
value = NULL;
}
/* Replace empty value */
Expand Down

0 comments on commit 9cc63ed

Please sign in to comment.