Changes between Initial Version and Version 1 of Ticket #28621, comment 4


Ignore:
Timestamp:
Jan 24, 2018, 5:55:04 AM (7 years ago)
Author:
Leo Antunes

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28621, comment 4

    initial v1  
    33SomeModel.objects.annotate(mod=Subquery(SomeModel.objects.filter(pk=OuterRef('pk')%2).values('pk')))
    44}}}
     5This generates the related {{{'ResolvedOuterRef' object has no attribute 'relabeled_clone'}}} exception. I believe these two issues are related, since they both point at {{{OuterRef()}}} behaving differently than what one would expect with, e.g., {{{F()}}}.
     6
    57Simply removing "%2" is enough to make it work (though not with the expected results, of course):
    68{{{#!python
Back to Top