Skip to content

Commit

Permalink
Merge pull request #78 from Uniandes-isis2603/revega11
Browse files Browse the repository at this point in the history
Commit 8:Entrega parcial 8
  • Loading branch information
ramonvega96 authored Mar 15, 2017
2 parents 6cb0313 + 5504b01 commit 89a9da7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public OfertaEntity createOferta(OfertaEntity oferta)throws BusinessLogicExcepti
throw new BusinessLogicException ("La oferta debe tener fecha y esta debe ser posterior a la fecha actual");
if(oferta.getInscritos() != 0)
throw new BusinessLogicException ("El numero de inscritos no puede ser diferente de cero");
//if(Ppersistence.find(oferta.getPaseo().getId()) == null)
// throw new BusinessLogicException ("El paseo no existe");
//if(Upersistence.find(oferta.getGuia().getId()) == null || !Upersistence.find(oferta.getGuia().getId()).getGuia())
// throw new BusinessLogicException ("El guía no existe");
if(Ppersistence.find(oferta.getPaseo().getId()) == null)
throw new BusinessLogicException ("El paseo no existe");
if(Upersistence.find(oferta.getGuia().getId()) == null || !Upersistence.find(oferta.getGuia().getId()).getGuia())
throw new BusinessLogicException ("El guía no existe");
return Opersistence.create(oferta);
}

Expand Down

0 comments on commit 89a9da7

Please sign in to comment.