Skip to content

FileField & ImageField: empty link on detail page #7631

@Seb33300

Description

@Seb33300

Describe the bug
When using an optional FileField or an ImageField in a crud, on the detail page, if no file/image was uploaded, an empty clickable link is generated returning a 404.
And for the image, an empty image is trying to be rendered:

Image

To Reproduce

  1. Create a crud with a nullable FileField or ImageField.
  2. Save entity without file/image.
  3. Open the detail page
  4. You should see a clickable link to 404 error page

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions