mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-09 16:59:03 +01:00
Fixed exception when trying to export an empty entity list
Fixes issue #836
This commit is contained in:
@@ -112,8 +112,9 @@ class PartImportExportController extends AbstractController
|
||||
$ids = $request->query->get('ids', '');
|
||||
$parts = $this->partsTableActionHandler->idStringToArray($ids);
|
||||
|
||||
if ($parts === []) {
|
||||
throw new \RuntimeException('No parts found!');
|
||||
if (count($parts) === 0) {
|
||||
$this->addFlash('error', 'entity.export.flash.error.no_entities');
|
||||
return $this->redirectToRoute('homepage');
|
||||
}
|
||||
|
||||
//Ensure that we have access to the parts
|
||||
|
||||
Reference in New Issue
Block a user