filefield - Workaround Django error on model delete due to empty file field w/Thumbnailer -


i have model easythumbnailer file field, using boto storage , undelete, , instances of model have empty file field prevents me deleting them:

python/lib/python2.7/site-packages/django/db/models/fields/files.pyc in _require_file(self)      39     def _require_file(self):      40         if not self: ---> 41             raise valueerror("the '%s' attribute has no file associated it." % self.field.name)      42       43     def _get_file(self):  valueerror: 'image' attribute has no file associated it. 

i error when try delete within shell or website, , don't know how work around or remove whatever protection causing result in error.

i don't need clean solution, code base not long world, works.

model.delete(trash=false) 

turns out due interactions between "trashable" , empty file field, skips interactions.


Comments

Popular posts from this blog

php - Dynamic url re-writing using htaccess -

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -