bug fix in commodity insert

This commit is contained in:
babak alizadeh 2024-06-24 01:55:03 +03:30
parent 902d3f4829
commit 6ad49b2d12

View file

@ -283,7 +283,8 @@ class CommodityController extends AbstractController
return $this->json(['result' => 3]); return $this->json(['result' => 3]);
if ($code == 0) { if ($code == 0) {
$data = $entityManager->getRepository(Commodity::class)->findOneBy([ $data = $entityManager->getRepository(Commodity::class)->findOneBy([
'name' => $params['name'] 'name' => $params['name'],
'bid'=> $acc['bid']
]); ]);
//check exist before //check exist before
if ($data) if ($data)