diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-01-07 16:20:36 -0500 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-01-12 16:38:32 -0500 |
| commit | 1a70889d5837982a111bca0280ea6ca782c6de6b (patch) | |
| tree | cd35fc16e92fd56849a4105029d8a2d7a75e4bc1 | |
| parent | 2b192bff26cf956c168790fce6a637cbd814250b (diff) | |
Refs #36769 -- Corrected invalid XML fixtures.
fixture9.xml was likely wrong since its introduction in
35cc439228cd32dfa7a3ec919db01a8a5cd17d33.
The relevant part of the Visa model is:
class Visa(models.Model):
person = models.ForeignKey(Person, models.CASCADE)
The Visa.person <field>s needed to be declared as relations, and
the Person <field>s didn't need their values wrapped in `<natural>`,
since they weren't relations.
| -rw-r--r-- | tests/fixtures/fixtures/fixture9.xml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/fixtures/fixtures/fixture9.xml b/tests/fixtures/fixtures/fixture9.xml index 100f63d106..51003093f3 100644 --- a/tests/fixtures/fixtures/fixture9.xml +++ b/tests/fixtures/fixtures/fixture9.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <django-objects version="1.0"> <object pk="2" model="fixtures.visa"> - <field type="CharField" name="person"> + <field name="person" rel="ManyToOneRel" to="fixtures.person"> <natural>Stephane Grappelli</natural> </field> <field to="auth.permission" name="permissions" rel="ManyToManyRel"> @@ -19,11 +19,11 @@ </object> <object pk="3" model="fixtures.person"> <field type="CharField" name="name"> - <natural>Artist formerly known as "Prince"</natural> + Artist formerly known as "Prince" </field> </object> <object pk="3" model="fixtures.visa"> - <field type="CharField" name="person"> + <field name="person" rel="ManyToOneRel" to="fixtures.person"> <natural>Artist formerly known as "Prince"</natural> </field> <field to="auth.permission" name="permissions" rel="ManyToManyRel"> |
