Changes between Version 1 and Version 2 of Ticket #27332


Ignore:
Timestamp:
Oct 10, 2016, 4:52:53 PM (8 years ago)
Author:
MikiSoft
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27332 – Description

    v1 v2  
    1818from django.db.models.functions import Coalesce
    1919
    20 Event.objects.filter(Q(pk__in=Like.objects.filter(person__pk‌​‌​=1, content_type__pk=17).prefetch_related('content_object').values_l‌​‌​ist('object_id', flat=True)) | Q(business__manager=1)).order_by(Coalesce('likes__date', 'when').desc())
     20Event.objects.filter(Q(pk__in=Like.objects.filter(person_id=1, content_type_id=17).prefetch_related('content_object').values_list('object_id', flat=True)) | Q(business__manager_id=1)).order_by(Coalesce('likes__date', 'when').desc())
    2121}}}
    2222
Back to Top