Skip to content

Commit

Permalink
removed unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Prateek Banga authored and Prateek Banga committed Jul 17, 2023
1 parent 052f496 commit d5750aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Database/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -3086,16 +3086,16 @@ private function updateDocumentRelationships(Document $collection, Document $old
$removedDocuments = \array_diff($oldIds, $newIds);

foreach ($removedDocuments as $relation) {
$relation = $this->skipRelationships(fn () => Authorization::skip(fn () => $this->getDocument(
$relation = $this->skipRelationships(fn () => $this->getDocument(
$relatedCollection->getId(),
$relation
)));
));

$this->skipRelationships(fn () => Authorization::skip(fn () =>$this->updateDocument(
$this->skipRelationships(fn () =>$this->updateDocument(
$relatedCollection->getId(),
$relation->getId(),
$relation->setAttribute($twoWayKey, null)
))); //removing relationship from 10 id document in collection B by updating it.
));
}

foreach ($value as $relation) {
Expand Down

0 comments on commit d5750aa

Please sign in to comment.