Skip to content
Snippets Groups Projects
Commit b5fd122b authored by Johannes Boog's avatar Johannes Boog
Browse files

[bugfix] skip export of elements that are NULL

parent 7ac5793e
No related branches found
No related tags found
1 merge request!54[bugfix] make all OGS6 benchmarks work.
...@@ -42,9 +42,16 @@ to_node <- function(object, object_name = "", ...@@ -42,9 +42,16 @@ to_node <- function(object, object_name = "",
object_name %in% attribute_names))){ object_name %in% attribute_names))){
if(object_name %in% flatten_on_exp){ if(object_name %in% flatten_on_exp){
if(is.list(object)){
ret_list <- list(list(list(paste(object, collapse = " "))))
names(ret_list)[[1]] <- object_name
names(ret_list[[1]])[[1]] <- names(object)[[1]]
}else{
ret_list <- list(list(paste(object, collapse = " "))) ret_list <- list(list(paste(object, collapse = " ")))
names(ret_list)[[1]] <- object_name names(ret_list)[[1]] <- object_name
return(invisible(ret_list)) }
return(invisible(ret_list))
} }
if(object_name %in% attribute_names){ if(object_name %in% attribute_names){
...@@ -154,6 +161,10 @@ to_node <- function(object, object_name = "", ...@@ -154,6 +161,10 @@ to_node <- function(object, object_name = "",
for(i in seq_len(length(object))){ for(i in seq_len(length(object))){
if(is.null(object[[i]])){
next
}
element_name <- names(object)[[i]] element_name <- names(object)[[i]]
element_node <- to_node(object[[i]], element_node <- to_node(object[[i]],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment