Skip to content

Commit

Permalink
Fix bug for removing model elevation from sqlite files (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-MET authored Jan 11, 2023
1 parent 8e8506b commit 9afda5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/write_fctable_to_sqlite.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ write_fctable_to_sqlite <- function(

data <- check_level(data)

if (member_elev_diff(data)) {
if (!remove_model_elev && member_elev_diff(data)) {
stop(
"Problem writing to: \n\"", filename, "\"\n",
"`model_elevation` is not the same for all members. ",
"\nSet `remove_model_elev = TRUE` to write data without model elevation.",
"\nSet `remove_model_elev = TRUE` in sqlite_opts()",
"to write data without model elevation.",
call. = FALSE
)
}
Expand Down

0 comments on commit 9afda5a

Please sign in to comment.