diff --git a/R/get_data.R b/R/get_data.R
index cd665ea3940ad6a1e677b7d19bf2ec369c341e6c..04b4be6d6f3bb16f1fc04cc3895a3f640039352f 100644
--- a/R/get_data.R
+++ b/R/get_data.R
@@ -173,8 +173,9 @@ importer_data <- function(table = NULL, schema = NULL, db  = "public", server =
   if(exists("data_sf") & nrow(def_table) > 0) {
     sf::st_geometry(data) <- sf::st_geometry(data_sf)
     # renommage du champ geo a l'identique
+    sf_col_name <- attributes(data_sf)$sf_column
     data <- dplyr::rename_with(data, ~gsub("^geometry$", sf_col_name, .x))
-    sf::st_geometry(data) <- attributes(data_sf)$sf_column
+    sf::st_geometry(data) <- sf_col_name
 
     data <- dplyr::relocate(data, dplyr::all_of(defs$nms))
   }