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

Critical Typo in registering custom Rendition model #311

Open
engAmirEng opened this issue Feb 8, 2023 · 3 comments
Open

Critical Typo in registering custom Rendition model #311

engAmirEng opened this issue Feb 8, 2023 · 3 comments

Comments

@engAmirEng
Copy link
Contributor

engAmirEng commented Feb 8, 2023

elif issubclass(cls, AbstractDocument):
register_document_model(cls, type_prefix)
elif issubclass(cls, AbstractImage):
register_image_model(cls, type_prefix)
elif issubclass(cls, AbstractRendition):
register_image_model(cls, type_prefix)
elif has_wagtail_media and issubclass(cls, AbstractMedia):
register_media_model(cls, type_prefix)

Line 140 should call register_image_rendition_model() not register_image_model()

Fixing this typo will breake the server duo to "python-BaseException KeyError: '__module__'" so this issue actually references two issues

And a note for contributors: I Love and appreciate what you have done here in this project 👌❤

@zerolab
Copy link
Member

zerolab commented Feb 8, 2023

Oh, wow. that has been there for some time (#16)
How did you stumble upon it?

@engAmirEng
Copy link
Contributor Author

Oh, wow. that has been there for some time (#16) How did you stumble upon it?

Yea, I'm doing quite an uncommon project and I discover these kind of stuff in wagtail itself too,
About this particular one, I am providing the option for users to register their own object storage to be used for pictures, documents and stuff and that's where I needed custom rendition model

@zerolab
Copy link
Member

zerolab commented Feb 9, 2023

@engAmirEng if you have time, a PR is most welcome ;)

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

2 participants