#36384: update_dimension_fields blocks getting model instances from the database
when the external storage has issues
-------------------------------------+-------------------------------------
Reporter: Gerben Morsink | Owner: (none)
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: 5.1
(models, ORM) | Resolution:
Severity: Normal | worksforme
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):
* resolution: => worksforme
* status: new => closed
Comment:
> even when I simply want to get the object without the width and height,
like here: `UserAvatar.objects.get(user=user).only('id')`
I cannot replicate this. Update dimension fields has logic to handle this,
and from my testing this works
{{{
# Nothing to update if the field doesn't have dimension fields or
if
# the field is deferred.
has_dimension_fields = self.width_field or self.height_field
if not has_dimension_fields or self.attname not in
instance.__dict__:
return
}}}
Can you provide a test or a way to replicate this behavior?
--
Ticket URL: <https://code.djangoproject.com/ticket/36384#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070196c464a4c8-c675861a-52f4-4912-94fd-4dbbbc434565-000000%40eu-central-1.amazonses.com.