diff --git a/DESCRIPTION b/DESCRIPTION index 0568468..b5edb13 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: geosapi Type: Package Title: GeoServer REST API R Interface -Version: 0.6-6 -Date: 2023-09-01 +Version: 0.6-7 +Date: 2023-10-03 Authors@R: c(person("Emmanuel", "Blondel", role = c("aut", "cre"), email = "emmanuel.blondel1@gmail.com", comment = c(ORCID = "0000-0002-5870-5762"))) Maintainer: Emmanuel Blondel Description: Provides an R interface to the GeoServer REST API, allowing to upload diff --git a/NEWS.md b/NEWS.md index 79fd3a5..8da29d5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +## [geosapi 0.6-7](https://cran.r-project.org/package=geosapi) | [![CRAN_Status_Badge](https://img.shields.io/badge/CRAN-unavailable-red.svg)](https://cran.r-project.org/package=geosapi) + +*Bug fixes** + +* [#64](https://github.com/eblondel/geosapi/issues/64) Fix workspace-based style creation/update/delete methods + ## [geosapi 0.6-6](https://cran.r-project.org/package=geosapi) | [![CRAN_Status_Badge](https://img.shields.io/badge/CRAN-published-blue.svg)](https://cran.r-project.org/package=geosapi) **Enhancements** diff --git a/R/GSStyleManager.R b/R/GSStyleManager.R index 24df303..a731476 100644 --- a/R/GSStyleManager.R +++ b/R/GSStyleManager.R @@ -149,7 +149,7 @@ GSStyleManager <- R6Class("GSStyleManager", } reqUrl <- "" - if(!missing(ws) & is.null(ws)){ + if(!missing(ws) & !is.null(ws)){ reqUrl <- sprintf("/workspaces/%s", ws) } reqUrl <- paste0(reqUrl, "/styles?name=", name) @@ -205,7 +205,7 @@ GSStyleManager <- R6Class("GSStyleManager", } reqUrl <- "" - if(!missing(ws) & is.null(ws)){ + if(!missing(ws) & !is.null(ws)){ reqUrl <- sprintf("/workspaces/%s", ws) } reqUrl <- paste0(reqUrl, sprintf("/styles/%s.xml", name)) @@ -243,7 +243,7 @@ GSStyleManager <- R6Class("GSStyleManager", deleted <- FALSE path <- "" - if(!missing(ws) & is.null(ws)){ + if(!missing(ws) & !is.null(ws)){ path <- sprintf("/workspaces/%s", ws) } path <- paste0(path, sprintf("/styles/%s", name))