Ticket #2214: related.diff
File related.diff, 574 bytes (added by , 18 years ago) |
---|
-
django/db/models/fields/__init__.py
277 277 field's data. 278 278 """ 279 279 if rel: 280 return new_data.get(self.name, [self.get_default()])[0] 281 val = new_data.get(self.name, self.get_default()) 280 val = new_data.get(self.name, [self.get_default()])[0] 281 else: 282 val = new_data.get(self.name, self.get_default()) 282 283 if not self.empty_strings_allowed and val == '' and self.null: 283 284 val = None 284 285 return val