Ignore empty connects.
@@ -40,6 +40,7 @@ pub fn connect_nested_connect(
.unique()
.collect();
+ if !filters.is_empty() {
let filter = Filter::or(filters);
if relation.is_many_to_many() {
@@ -49,6 +50,9 @@ pub fn connect_nested_connect(
} else {
handle_one_to_one(graph, parent_node, parent_relation_field, filter, child_model)
}
+ } else {
+ Ok(())
+ }
}
/// Handles a many-to-many nested connect.
