Skip to content

Commit

Permalink
Fix gallery deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamek authored Oct 15, 2018
1 parent 4289db8 commit 060b5f4
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,13 @@ public function gridGroupActionDelete(array $ids)
*/
public function handleDelete($id)
{
$locales = $this->galleryRepository->getById($id);
foreach ($locales AS $locale)
$galleries = $this->galleryRepository->getById($id);
foreach ($galleries AS $gallery)
{
foreach($gallery->getPictures() AS $picture){
$this->entityManager->remove($picture);
}

$this->entityManager->remove($locale);
}

Expand Down

0 comments on commit 060b5f4

Please sign in to comment.