correccion lista padre

parent 60c6bf04
......@@ -327,14 +327,14 @@ class ListadoController extends AbstractController {
if ($padreId != null && $padreId != "default") {
$listaPadre = $this->manager->getRepository(PluLista::class)->find($padreId);
if ($listaPadre->getTag() != $tag) {
if ($listaPadre !== null && $listaPadre->getTag() != $tag) {
$log->error("Los tags ingresados no coinciden...");
$json->setData(array('errors' => 'Estimado usuario, el tag de la lista padre debe ser igual al seleccionado.'));
$json->setStatusCode(JsonResponse::HTTP_BAD_REQUEST);
return $json;
}
if ($listaPadre->getLisPrecio() == 0 && $precio == 0) {
if ($listaPadre !== null && $listaPadre->getLisPrecio() == 0 && $precio == 0) {
$log->error("Padre e hija no pueden tener valor 0...");
$json->setData(array('errors' => 'Estimado usuario, debe ingresar un valor para esta lista, dado que el padre posee valor 0.'));
$json->setStatusCode(JsonResponse::HTTP_BAD_REQUEST);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment