Exemplo n.º 1
0
 def delete_singer(cls, singer_id):
     singer = Singer().get(singer_id, links=True)
     
     if singer is None:
         raise NotFoundException()
     
     # remove the singer from storage first
     singer.remove()
     
     # then remove the singer and re-index any related objects
     SingerIndex.delete_by_id(singer.id)