entities/adapters.py
branchstable
changeset 6752 7351806cd485
parent 6582 8eb7883b4223
child 6864 ea95004494a2
equal deleted inserted replaced
6750:ef513c03a224 6752:7351806cd485
   482 class IUserFriendlyUniqueTogether(IUserFriendlyError):
   482 class IUserFriendlyUniqueTogether(IUserFriendlyError):
   483     __select__ = match_exception(UniqueTogetherError)
   483     __select__ = match_exception(UniqueTogetherError)
   484     def raise_user_exception(self):
   484     def raise_user_exception(self):
   485         etype, rtypes = self.exc.args
   485         etype, rtypes = self.exc.args
   486         msg = self._cw._('violates unique_together constraints (%s)') % (
   486         msg = self._cw._('violates unique_together constraints (%s)') % (
   487             ', '.join(self._cw._(rtypes)))
   487             ', '.join([self._cw._(rtype) for rtype in rtypes]))
   488         raise ValidationError(self.entity.eid, dict((col, msg) for col in rtypes))
   488         raise ValidationError(self.entity.eid, dict((col, msg) for col in rtypes))