Ticket #10300: 10300.diff

File 10300.diff, 543 bytes (added by Karen Tracey, 10 years ago)
  • django/db/models/fields/files.py

     
    6565
    6666    def _get_size(self):
    6767        self._require_file()
    68         return self.storage.size(self.name)
     68        if self._committed:
     69            return self.storage.size(self.name)
     70        else:
     71            return super(FieldFile, self).size
    6972    size = property(_get_size)
    7073
    7174    def open(self, mode='rb'):
Back to Top