Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting storage class does not support deconstructors #712

Open
michjnich opened this issue Sep 6, 2022 · 0 comments
Open

Setting storage class does not support deconstructors #712

michjnich opened this issue Sep 6, 2022 · 0 comments

Comments

@michjnich
Copy link

When setting the storage, sorl does not allow for a class instance being deconstructible, which is necessary to be able to use backends with arguments.

sorl.thumbnails.images.py

cls = self.storage._wrapped.__class__

For a deconstructible class this can use self.storage.deconstruct (checking whether the class is deconstructible first to ensure backwards compatibility).

deserialize could check whether the storage is a list (deconstructible) or a single value (old method)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant