From 360da65b3cf8b2a20735795ee4a6b3a598a96133 Mon Sep 17 00:00:00 2001 From: s915 Date: Sat, 14 Sep 2019 01:11:03 +0200 Subject: [PATCH] Correct function remove_provider!() for Nothing --- src/rdb_by_api_link.jl | 8 ++++---- src/utils.jl | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/rdb_by_api_link.jl b/src/rdb_by_api_link.jl index dceaa1e..4a1d726 100644 --- a/src/rdb_by_api_link.jl +++ b/src/rdb_by_api_link.jl @@ -330,10 +330,10 @@ function rdb_by_api_link( ) if suffix != "" - DBdata[Symbol(addcol)] = ifelse.( - isa.(DBdata[Symbol(newcol)], Missing), - DBdata[Symbol(addcol)], - DBdata[Symbol(newcol)] + DBdata[selectop, Symbol(addcol)] = ifelse.( + isa.(DBdata[selectop, Symbol(newcol)], Missing), + DBdata[selectop, Symbol(addcol)], + DBdata[selectop, Symbol(newcol)] ) df_delete_col!(DBdata, Symbol(newcol)) end diff --git a/src/utils.jl b/src/utils.jl index 40b6d43..3bec7ac 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -468,11 +468,13 @@ end #------------------------------------------------------------------------------- # remove_provider +remove_provider!(x::Nothing) = nothing function remove_provider!(x::Array) map(x) do u u[1] = replace(u[1], r".*/" => "") u end + nothing end #-------------------------------------------------------------------------------