Opened 3 years ago

Last modified 2 years ago

#18207 new Bug

concrete inheritence, mysql defer bug

Reported by: leftmoose Owned by: nobody
Component: Database layer (models, ORM) Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Using concrete inheritence, mysql and defer, values returned aren't properly converted to objects


    def test_concrete_ineritance_defer(self):
            name="Guido's House of Pasta",
            address='944 W. Fullerton',
        value_with_defer = Restaurant.objects.defer('name').get().serves_pizza
        self.assertIs(value_with_defer, False)

fails when using a mysql database

value_with_defer comes back as 0, not False

Change History (2)

comment:1 Changed 3 years ago by akaariai

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Confirmed for Oracle, too.

comment:2 Changed 2 years ago by akaariai

  • Type changed from Uncategorized to Bug
Note: See TracTickets for help on using tickets.
Back to Top