Ticket #10244: filefield_null.diff
File filefield_null.diff, 793 bytes (added by , 16 years ago) |
---|
-
django/db/models/fields/files.py
20 20 self.instance = instance 21 21 self.field = field 22 22 self.storage = field.storage 23 self._name = name or u''23 self._name = name 24 24 self._closed = False 25 25 self._committed = True 26 26 … … 175 175 def get_db_prep_value(self, value): 176 176 "Returns field's value prepared for saving into a database." 177 177 # Need to convert File objects provided via a form to unicode for database insertion 178 if value isNone:178 if value == None: 179 179 return None 180 180 return unicode(value) 181 181