Skip to content

Additional query when using only() #203

Closed
@jmaslanka

Description

@jmaslanka

Hello!

I have added StdImageField to a model, simple one:

photo = StdImageField(
    verbose_name=_('image'),
    upload_to=UploadToClassNameDirUUID(),
    blank=True,
)

When I do a query on that model with only('<some_other_field>') Django will create additional query to fetch an image:
image

Is is possible to avoid that fetch? I know I could just add photo to only() but it's a workaround that would only create confusion in my code.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions