Skip to content

Commit

Permalink
fix GetObject WithRelations (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
gertd authored Nov 17, 2023
1 parent a3873d6 commit 2c7a101
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 2c7a101

Please sign in to comment.