You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifnotself.__dict__.has_key(attribute):
# Proceed to thumbnail generation only if a *thumbnail* attribute# is requestedifself.field.thumbnails.has_key(attribute):
# Generate thumbnailself._require_file() # TODO: document thisifself._verify_thumbnail_requirements():
proc_opts=self.field.thumbnails[attribute]
t=ThumbnailFieldFile(self.instance, self.field, self, self.name, attribute, proc_opts)
t.save()
assertself.__dict__[attribute] ==t, \
Exception('Thumbnail attribute `%s` not set'%attribute)
else:
returnsuper(BaseEnhancedImageFieldFile, self).__getattr__(attribute)
returnself.__dict__[attribute]
I'm getting a condition where if self._verify_thumbnail_requirements() is false and then it pops down to self.__dict__[attribute] which throws an error.
I think there should be some logic to account for this.
Unfortunately, I wasn't able to figure out exactly how I got my field/thumbnail into this state. I imagine that's not too helpful. The only steps I remember doing was having an image, editing that model and uploading a new image, and pressing save. My form had an error so I was being redirected back to the form. I guess it could be form some in-between state that the field is in? I'm not sure.
The text was updated successfully, but these errors were encountered:
In fields.py
I'm getting a condition where
if self._verify_thumbnail_requirements()
is false and then it pops down toself.__dict__[attribute]
which throws an error.I think there should be some logic to account for this.
Unfortunately, I wasn't able to figure out exactly how I got my field/thumbnail into this state. I imagine that's not too helpful. The only steps I remember doing was having an image, editing that model and uploading a new image, and pressing save. My form had an error so I was being redirected back to the form. I guess it could be form some in-between state that the field is in? I'm not sure.
The text was updated successfully, but these errors were encountered: