__init__.py
changeset 8696 0bb18407c053
parent 8694 d901c36bcfce
child 8748 f5027f8d2478
equal deleted inserted replaced
8695:358d8bed9626 8696:0bb18407c053
   213     """
   213     """
   214     if substitutions is None:
   214     if substitutions is None:
   215         # set empty dict else translation won't be done for backward
   215         # set empty dict else translation won't be done for backward
   216         # compatibility reason (see ValidationError.translate method)
   216         # compatibility reason (see ValidationError.translate method)
   217         substitutions = {}
   217         substitutions = {}
   218     for key in errors.keys():
   218     for key in list(errors):
   219         if isinstance(key, tuple):
   219         if isinstance(key, tuple):
   220             errors[rname(*key)] = errors.pop(key)
   220             errors[rname(*key)] = errors.pop(key)
   221     return ValidationError(getattr(entity, 'eid', entity), errors,
   221     return ValidationError(getattr(entity, 'eid', entity), errors,
   222                            substitutions, i18nvalues)
   222                            substitutions, i18nvalues)