Ticket #2724: fun_with_rel.diff

File fun_with_rel.diff, 944 bytes (added by erob@…, 18 years ago)

some fun with rel :)

  • __init__.py

     
    284284        Given the full new_data dictionary (from the manipulator), returns this
    285285        field's data.
    286286        """
    287         if rel:
    288             return new_data.get(self.name, [self.get_default()])[0]
    289         val = new_data.get(self.name, self.get_default())
    290         if not self.empty_strings_allowed and val == '' and self.null:
    291             val = None
     287        if rel is not False:
     288           # XXX What means ``rel`` ?
     289           val = new_data.get(self.name, [self.get_default()])
     290        else:
     291           val = new_data.get(self.name, self.get_default())
     292           if not self.empty_strings_allowed and val == '' and self.null:
     293              val = None
    292294        return val
    293295
    294296    def get_choices(self, include_blank=True, blank_choice=BLANK_CHOICE_DASH):
Back to Top