Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Singh <[email protected]>
  • Loading branch information
theBeginner86 committed Jan 19, 2023
1 parent 46c6ff7 commit 284b5e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/meshmodel/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ func (rm *RegistryManager) RegisterEntity(h Host, en Entity) error {
func (rm *RegistryManager) GetEntities(f types.Filter) []Entity {
switch filter := f.(type) {
case *v1alpha1.ComponentFilter:
en := make([]Entity, 1)
en := make([]Entity, 0)
comps := v1alpha1.GetComponents(rm.db, *filter)
for _, comp := range comps {
en = append(en, comp)
}
return en
case *v1alpha1.RelationshipFilter:
en := make([]Entity, 1)
en := make([]Entity, 0)
relationships := v1alpha1.GetRelationships(rm.db, *filter)
for _, rel := range relationships {
en = append(en, rel)
Expand Down

0 comments on commit 284b5e7

Please sign in to comment.