Ticket #3765: patch.diff
File patch.diff, 750 bytes (added by , 18 years ago) |
---|
-
django/db/models/fields/__init__.py
286 286 field's data. 287 287 """ 288 288 if rel: 289 return new_data.get(self.name, [self.get_default()])[0] 289 new_data_getted = new_data.get(self.name, [self.get_default()]) 290 if(isinstance(new_data_getted, list)): 291 return new_data_getted[0] 292 else: 293 return new_data_getted 290 294 val = new_data.get(self.name, self.get_default()) 291 295 if not self.empty_strings_allowed and val == '' and self.null: 292 296 val = None