#34907: loaddata crashes on objects with natural keys when don't exist on passed
database.
-------------------------------------+-------------------------------------
Reporter: Florian | Owner: (none)
Type: Bug | Status: new
Component: Core | Version: 4.2
(Serialization) |
Severity: Normal | Resolution:
Keywords: natural key, multi- | Triage Stage: Accepted
db, loaddata |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Gaurav Jain):
Hey @Florian, it looks like there's a typo in DATABASE_ROUTES. Although
the test works without the patch, applying it breaks other tests connected
to **loaddata**, particularly those linked to a multidb setup, such as
**django/tests/multiple_database/tests.py:
FixtureTestCase.test_pseudo_empty_fixtures**.
Due to the patch suppressing this error, loaddata proceeds silently with
the subsequent steps. Consequently, it fails to assert the expected string
in the mentioned test case and We're encountering a '**'RuntimeWarning: No
fixture data found for 'pets'. (The file format might be invalid.)''**
--
Ticket URL: <https://code.djangoproject.com/ticket/34907#comment:7>
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/0107018c0b68b96d-130cb3b1-f014-495a-8017-c283146e5725-000000%40eu-central-1.amazonses.com.