Closed python-consulting closed 10 years ago
Ignore the patch as it introduces side effects.
I found a better solution. It's clean and working ;)
Hi, Any chance you could write a new unit test to show the bug/show that you've fixed it? I'd be happy to do it myself normally - but I'm a bit busy at the moment so it will be a week or so before I can write any code.
I've cherry-picked your last commit into Photologue - I haven't tested it, but I trust that your code works as intended!
The date_taken field of photo is set when saving the ImageModel. However when uploading one photo at a time, the path of the actual image is not the final one. In that latter case EXIF extraction failed because it cannot find the file. Logging path values on ImageModel.save(...) gave me an indication on what was going on. During a gallery upload, this is not the case thanks to the statement : photo.image.save(filename, ContentFile(data))
I am considering a clean patch but I only came up with an hugly hack : calling super(ImageModel, self).save(_args, *_kwargs) before setting the date_taken field :( I ll create a pull request anyway.