Skip to content

Commit 99cbb98

Browse files
Affiedehann
authored andcommitted
hotfix for lsf with tags filter and test close #528
1 parent 904ef6c commit 99cbb98

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/LightDFG/services/LightDFG.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ end
204204
function listFactors(dfg::LightDFG, regexFilter::Union{Nothing, Regex}=nothing; tags::Vector{Symbol}=Symbol[], solvable::Int=0)::Vector{Symbol}
205205
# factors = map(v -> v.dfgNode, filter(n -> n.dfgNode isa DFGFactor, vertices(dfg.g)))
206206
if length(tags) > 0
207-
return map(v -> v.label, getFactor(dfg, regexFilter, tags=tags, solvable=solvable))
207+
return map(v -> v.label, getFactors(dfg, regexFilter, tags=tags, solvable=solvable))
208208
end
209209
factors = collect(keys(dfg.g.factors))
210210
if regexFilter != nothing

test/testBlocks.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,9 @@ function testGroup!(fg, v1, v2, f0, f1)
899899
@test ls(fg, tags=[:POSE]) == []
900900
@test issetequal(ls(fg, tags=[:POSE, :LANDMARK]), ls(fg, tags=[:VARIABLE]))
901901

902+
@test lsf(fg, tags=[:NONE]) == []
903+
@test lsf(fg, tags=[:PRIOR]) == [:af1]
904+
902905
# Regexes
903906
@test ls(fg, r"a") == [v1.label]
904907
@test lsf(fg, r"abf*") == [f1.label]

0 commit comments

Comments
 (0)