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

Image is Missing When Using Inline Upload #170

Open
ephes opened this issue Dec 22, 2024 · 0 comments
Open

Image is Missing When Using Inline Upload #170

ephes opened this issue Dec 22, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ephes
Copy link
Owner

ephes commented Dec 22, 2024

When an image is uploaded through the inline upload form when adding an image in the Wagtail editor, it is missing from the repository on rendering the draft.

    @staticmethod
    def get_image_and_renditions(image_id: int, context: dict) -> tuple[Image, dict[str, Rendition]]:
        repository: HasImagesAndRenditions = context["repository"]
        image = repository.image_by_id[image_id]  # error
        image_renditions = repository.renditions_for_posts.get(image.pk, [])
        fetched_renditions = {r.filter_spec: r for r in image_renditions}
        return image, fetched_renditions
@ephes ephes added the bug Something isn't working label Dec 22, 2024
@ephes ephes self-assigned this Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant