Skip to content

Commit

Permalink
Update query to retrieve format.id
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Black <[email protected]>
  • Loading branch information
Sweetdevil144 and infotroph authored Jul 10, 2024
1 parent 0ac2c93 commit d287192
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/data.atmosphere/R/read.register.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ read.register <- function(register.xml, con) {

} else if (is.null(register$format$id) & !is.null(register$format$name) & !is.null(register$format$mimetype)) {
register$format$id <- PEcAn.DB::db.query(
paste0("SELECT id from formats where name = '", register$format$name,
paste0(
"SELECT formats.id FROM formats JOIN mimetypes ON formats.mimetype_id = mimetypes.id ",
"WHERE name = '", register$format$name,
"' AND type_string = '", register$format$mimetype, "'"), con)[[1]]
}
}
Expand Down

0 comments on commit d287192

Please sign in to comment.