Exemplo n.º 1
0
 def xhr_delete(self):
     try:
         ids = [int(x) for x in self.request.POST['id'].split(',')
             if int(x) != 0]
         for id in ids:
             manager.delete_principal(id)
         return {'status': True, 'msg': 'Ok'}
     except (StatementError, NoResultFound, PySiteError) as exc:
         return {'status': False, 'msg': str(exc), 'errors': {}}
Exemplo n.º 2
0
 def delete_principal(self):
     rs = usrmanager.delete_principal(self._args.id)