Commit 3c19673db04644b6b7013588ab4c17d300e9487f

Authored by Bruno Menezes
2 parents a81dd8f8 1aa86522
Exists in master and in 1 other branch 3.1

Merge branch 'master' of https://github.com/lightbase/cacic

src/Cacic/WSBundle/Controller/ColetaController.php
... ... @@ -602,6 +602,13 @@ class ColetaController extends Controller
602 602 $softwareObject = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->findOneBy( array( 'nmSoftware' => $nmSoftware ) );
603 603 if (empty($softwareObject)) {
604 604 $softwareObject = new Software();
  605 + // Se não tiver nome coloco o ID Software no nome
  606 + if (empty($arrTagsNames['DisplayName'])) {
  607 + $softwareObject->setNmSoftware($softwareName);
  608 + } else {
  609 + $softwareObject->setNmSoftware($arrTagsNames['DisplayName']);
  610 + }
  611 +
605 612 // Grava software recém inserido
606 613 $this->getDoctrine()->getManager()->persist($softwareObject);
607 614 $this->getDoctrine()->getManager()->flush();
... ...