Giter VIP home page Giter VIP logo

Comments (8)

sorl avatar sorl commented on June 2, 2024

Sorry I cannot understand this issue property, please provide enough information for me to test this.

from sorl-thumbnail.

stopdesign avatar stopdesign commented on June 2, 2024

Confirm the error. Sorl-thumbnail tries to delete the image when I'm saving the object from admin, even if I did not set the "clear" checkbox.

from sorl-thumbnail.

sorl avatar sorl commented on June 2, 2024

Django version?

from sorl-thumbnail.

stopdesign avatar stopdesign commented on June 2, 2024

Django 1.3

from sorl-thumbnail.

n1k0 avatar n1k0 commented on June 2, 2024

Issue confirmed here as well, django 1.3 + latest sorl-thumbnail package available from pypi.

from sorl-thumbnail.

dokterbob avatar dokterbob commented on June 2, 2024

Issue confirmed here (Django 1.3 final). Also, #31 might be a dup of this one.

The errant situation seems to be the following:

  • Upload an image in some model, this works fine.
  • Updating the object yields no problems unless a ValidationError occurs on one or more fields of the model.
  • When a ValidationError is raised, it causes the ImageField in the form to 'forget' its contents - hence the image has to be uploaded again.

This error might be due to an assumption somewhere that cleaned_data contains the contents of the ImageField at all times. However, this need not be the case when a ValidationError occurs. Hence, when the value of the ImageField is not present in cleaned_data it should revert to the value from the model instance.

from sorl-thumbnail.

aaloy avatar aaloy commented on June 2, 2024

This is the he same issue as #31, so I'll close it. But the problem occurs even if no ValidationError is raised. As you can see on #31 the filename is not displayed when the record is shown in edit mode. So the problem happesn even there is no ValidatinError.

from sorl-thumbnail.

sorl avatar sorl commented on June 2, 2024

Fixed in latest version here, pypi will be up soon, just need to test it.

from sorl-thumbnail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.