Ticket #2724: fun_with_rel.diff
File fun_with_rel.diff, 944 bytes (added by , 18 years ago) |
---|
-
__init__.py
284 284 Given the full new_data dictionary (from the manipulator), returns this 285 285 field's data. 286 286 """ 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 292 294 return val 293 295 294 296 def get_choices(self, include_blank=True, blank_choice=BLANK_CHOICE_DASH):