Skip to content

Commit

Permalink
fix: respect agent_id and deleted_at for topologies
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra committed Jul 20, 2023
1 parent 63d00b9 commit cfe6edc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/db/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ func GetTopology(ctx context.Context, id string) (*v1.Topology, error) {
func GetAllTopologiesForSync() ([]v1.Topology, error) {
var v1topologies []v1.Topology
var topologies []pkg.Topology
if err := Gorm.Table("topologies").Find(&topologies).Where("deleted_at is NULL AND namespace != 'push'").Error; err != nil {
if err := Gorm.
Table("topologies").
Where("agent_id = '00000000-0000-0000-0000-000000000000'").
Where("deleted_at is NULL").
Find(&topologies).Error; err != nil {
return nil, err
}
for _, t := range topologies {
Expand Down

0 comments on commit cfe6edc

Please sign in to comment.