Skip to content

Commit c910e05

Browse files
authored
Merge pull request #1924 from Permify/entity-filter-fix-entrance
fix(internal): fix comparison condition for entity entrance type.
2 parents 25fada6 + e03819b commit c910e05

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/engines/entityFilter.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ func (engine *EntityFilter) attributeEntrance(
124124
g *errgroup.Group, // An errgroup used for executing goroutines.
125125
publisher *BulkEntityPublisher, // A custom publisher that publishes results in bulk.
126126
) error { // Returns an error if one occurs during execution.
127+
if request.GetEntrance().GetType() != entrance.TargetEntrance.GetType() {
128+
return nil
129+
}
130+
127131
if !visits.AddEA(entrance.TargetEntrance.GetType(), entrance.TargetEntrance.GetValue()) { // If the entity and relation has already been visited.
128132
return nil
129133
}

0 commit comments

Comments
 (0)