Changes between Initial Version and Version 1 of Ticket #28551


Ignore:
Timestamp:
Sep 4, 2017, 9:10:14 AM (7 years ago)
Author:
Tim Graham
Comment:

Looks like a duplicate of #21703.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28551

    • Property Component UncategorizedDatabase layer (models, ORM)
    • Property Type UncategorizedBug
  • Ticket #28551 – Description

    initial v1  
    1313The following test:
    1414{{{
    15         a1 = A()
    16         a1.save()
    17         a2 = A()
    18         a2.save()
    19         b1 = B()
    20         b1.save()
    21         b1.a.add(a1)
    22         b1.save()
    23         b2 = B()
    24         b2.save()
    25         b2.a.add(a2)
    26         b2.save()
    27         c1 = C(a=a1, b=b1)
    28         c1.save()
    29         c2 = C(a=a1, b=b2)
    30         c2.save()
    31         self.assertEqual(1, C.objects.filter(b__a=F('a')).count())
    32         self.assertEqual(1, C.objects.exclude(b__a=F('a')).count())
     15a1 = A()
     16a1.save()
     17a2 = A()
     18a2.save()
     19b1 = B()
     20b1.save()
     21b1.a.add(a1)
     22b1.save()
     23b2 = B()
     24b2.save()
     25b2.a.add(a2)
     26b2.save()
     27c1 = C(a=a1, b=b1)
     28c1.save()
     29c2 = C(a=a1, b=b2)
     30c2.save()
     31self.assertEqual(1, C.objects.filter(b__a=F('a')).count())
     32self.assertEqual(1, C.objects.exclude(b__a=F('a')).count())
    3333}}}
    3434Fails with the following error:
Back to Top