mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-21 14:47:24 +01:00
Fixed some inspection issues.
This commit is contained in:
@@ -187,12 +187,10 @@ class CurrencyController extends BaseAdminController
|
||||
|
||||
public function deleteCheck(AbstractNamedDBElement $entity): bool
|
||||
{
|
||||
if ($entity instanceof Currency) {
|
||||
if ($entity->getPricedetails()->count() > 0) {
|
||||
$this->addFlash('error', 'entity.delete.must_not_contain_prices');
|
||||
if (($entity instanceof Currency) && $entity->getPricedetails()->count() > 0) {
|
||||
$this->addFlash('error', 'entity.delete.must_not_contain_prices');
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user