Changes between Initial Version and Version 2 of Ticket #30129


Ignore:
Timestamp:
Jan 24, 2019, 2:52:13 PM (6 years ago)
Author:
Charlie McBride
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30129

    • Property Easy pickings unset
    • Property Summary Request to Allow F() Expressions in Subquery() on InsertAllow creating models with fields values as a Subquery() with F() expressions
  • Ticket #30129 – Description

    initial v2  
    2828        item=item,
    2929        version_number=Subquery(
    30             item.versions.order_by('- version_number').annotate(
     30            item.versions.order_by('-version_number').annotate(
    3131                max_version_number=Coalesce(Max('version_number'), 0)
    3232            ).annotate(
    3333                new_version_number=F('max_version_number) + 1
    34             ).values('new_version_number')[:1]
     34            ).values('new_version_number')
    3535         )
    3636     )
Back to Top