cubicweb/_exceptions.py
changeset 12508 a8c1ea390400
parent 12342 57e06dd166d4
child 12567 26744ad37953
equal deleted inserted replaced
12507:211472ab15c8 12508:a8c1ea390400
   100             return self.kwargs['rtypes']
   100             return self.kwargs['rtypes']
   101         cstrname = text_type(self.kwargs['cstrname'])
   101         cstrname = text_type(self.kwargs['cstrname'])
   102         cstr = self.session.find('CWUniqueTogetherConstraint', name=cstrname).one()
   102         cstr = self.session.find('CWUniqueTogetherConstraint', name=cstrname).one()
   103         return sorted(rtype.name for rtype in cstr.relations)
   103         return sorted(rtype.name for rtype in cstr.relations)
   104 
   104 
   105     @cachedproperty
       
   106     def args(self):
       
   107         warn('[3.18] UniqueTogetherError.args is deprecated, just use '
       
   108              'the .rtypes accessor.',
       
   109              DeprecationWarning)
       
   110         # the first argument, etype, is never used and was never garanteed anyway
       
   111         return None, self.rtypes
       
   112 
       
   113 
   105 
   114 class ViolatedConstraint(RepositoryError):
   106 class ViolatedConstraint(RepositoryError):
   115     def __init__(self, cnx, cstrname):
   107     def __init__(self, cnx, cstrname):
   116         self.cnx = cnx
   108         self.cnx = cnx
   117         self.cstrname = cstrname
   109         self.cstrname = cstrname