Skip to content

Commit

Permalink
fix GetObject WithRelations
Browse files Browse the repository at this point in the history
  • Loading branch information
gertd committed Nov 17, 2023
1 parent a3873d6 commit 7b839c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/directory/v3/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func (s *Writer) DeleteObject(ctx context.Context, req *dsw3.DeleteObjectRequest
return err
}

rel := ds.Relation(iter.Value())
for iter.Next() {
rel := ds.Relation(iter.Value())
if err := bdb.Delete(ctx, tx, bdb.RelationsObjPath, rel.ObjKey()); err != nil {
return err
}
Expand All @@ -105,8 +105,9 @@ func (s *Writer) DeleteObject(ctx context.Context, req *dsw3.DeleteObjectRequest
return err
}

rel := ds.Relation(iter.Value())
for iter.Next() {
rel := ds.Relation(iter.Value())

if err := bdb.Delete(ctx, tx, bdb.RelationsObjPath, rel.ObjKey()); err != nil {
return err
}
Expand Down

0 comments on commit 7b839c6

Please sign in to comment.