Skip to content

Commit

Permalink
fix(cognitarium): prevent predicate blank node filter
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Feb 27, 2024
1 parent 12d7952 commit 447bc72
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contracts/okp4-cognitarium/src/querier/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,15 @@ impl<'a> TriplePatternIterator<'a> {
)> {
let (s_filter, sb_filter, s_bind) =
Self::resolve_pattern_part(subject, ResolvedVariable::as_subject, input)?;
let (p_filter, _, p_bind) =
let (p_filter, pb_filter, p_bind) =
Self::resolve_pattern_part(predicate, ResolvedVariable::as_predicate, input)?;
let (o_filter, ob_filter, o_bind) =
Self::resolve_pattern_part(object, ResolvedVariable::as_object, input)?;

if pb_filter {
None?;
}

Some((
(s_filter, p_filter, o_filter),
(sb_filter, ob_filter),
Expand Down

0 comments on commit 447bc72

Please sign in to comment.