#34500: use annotate return feild, Error capture does not work
-------------------------------------+-------------------------------------
Reporter: ajinwu | Owner: ajinwu
Type: Bug | Status: closed
Component: Database layer | Version: 4.2
(models, ORM) | Resolution:
Severity: Normal | worksforme
Keywords: json decode | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by ajinwu):
model_to_dict is not import,That's a recurring example , this code can not
return value, if value is int, that can not return true data
{{{
#!div style="font-size: 80%"
{{{#!python
try:
return json.loads(value, cls=self.decoder)
except json.JSONDecodeError:
return value
}}}
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34500#comment:3>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/010701878e4026a6-5c278a10-9c9a-48f5-9501-4c079c0a8249-000000%40eu-central-1.amazonses.com.