Skip to content

Commit

Permalink
Merge pull request #77 from Uniandes-isis2603/revega11
Browse files Browse the repository at this point in the history
Commit 7:Entrega parcial 7
  • Loading branch information
ramonvega96 authored Mar 15, 2017
2 parents 07d809c + cb2d8e8 commit 6cb0313
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public OfertaDetailDTO updateOferta(@PathParam("id") Long id, OfertaDetailDTO dt

@DELETE
@Path("{id: \\d+}")
public void deleteOferta(@PathParam("id") Long id) {
public void deleteOferta(@PathParam("id") Long id) throws BusinessLogicException{
ofertaLogic.deleteOferta(id);
}
}
Expand Down

0 comments on commit 6cb0313

Please sign in to comment.