360
360
# Alias
361
361
deleteVariable! (dfg:: CloudGraphsDFG , variable:: DFGVariable ) = deleteVariable! (dfg, variable. label)
362
362
363
- function deleteFactor! (dfg:: CloudGraphsDFG , label:: Symbol ; suppressGetFactor:: Bool = false ):: Union{Nothing, DFGFactor}
363
+ # return ::DFGFactor, or workaround ::Nothing, #809
364
+ function deleteFactor! (dfg:: CloudGraphsDFG , label:: Symbol ; suppressGetFactor:: Bool = false )
364
365
factor = suppressGetFactor ? nothing : getFactor (dfg, label)
365
366
if factor === nothing && ! suppressGetFactor
366
367
error (" Unable to retrieve the ID for factor '$label '. Please check your connection to the database and that the factor exists." )
@@ -378,7 +379,7 @@ function deleteFactor!(dfg::CloudGraphsDFG, label::Symbol; suppressGetFactor::Bo
378
379
end
379
380
380
381
# Alias
381
- deleteFactor! (dfg:: CloudGraphsDFG , factor:: DFGFactor ; suppressGetFactor:: Bool = false ):: Union{Nothing, DFGFactor} = deleteFactor! (dfg, factor. label, suppressGetFactor= suppressGetFactor)
382
+ deleteFactor! (dfg:: CloudGraphsDFG , factor:: DFGFactor ; suppressGetFactor:: Bool = false ) = deleteFactor! (dfg, factor. label, suppressGetFactor= suppressGetFactor)
382
383
383
384
function getVariables (dfg:: CloudGraphsDFG , regexFilter:: Union{Nothing, Regex} = nothing ; tags:: Vector{Symbol} = Symbol[], solvable:: Int = 0 ):: Vector{DFGVariable}
384
385
variableIds = listVariables (dfg, regexFilter, tags= tags, solvable= solvable)
@@ -980,4 +981,4 @@ function SkeletonDFG(cfg::CloudGraphsDFG)
980
981
addVariable! .(sfg, _getSkeletonVariables (cfg))
981
982
addFactor! .(sfg, _getSkeletonFactors (cfg))
982
983
return sfg
983
- end
984
+ end
0 commit comments