Changes between Initial Version and Version 1 of Ticket #25113, comment 6


Ignore:
Timestamp:
Oct 5, 2019, 5:11:32 AM (5 years ago)
Author:
Dmitry Mugtasimov

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25113, comment 6

    initial v1  
    11It produce SQL like:
    22{{{
    3 NOT ("jobs_job"."id" IN (SELECT U0."id" FROM "jobs_jobstatus" U0))
     3NOT ("jobs_job"."id" IN (SELECT U0."job_id" FROM "jobs_jobstatus" U0))
    44}}}
    55
     
    77
    88{{{
    9 "jobs_job"."id" NOT IN (SELECT U0."id" FROM "jobs_jobstatus" U0)
     9"jobs_job"."id" NOT IN (SELECT U0."job_id" FROM "jobs_jobstatus" U0)
    1010}}}
    1111
     
    1616{{{
    1717Job.objects.filter(
    18             ~Q(id__in=JobStatus.objects.values_list('id', flat=True).all()),
     18            ~Q(id__in=JobStatus.objects.values_list('job_id', flat=True).all()),
    1919            ...
    2020        )
     
    2424
    2525{{{
    26 Job.objects.filter(...).exclude(id__in=JobStatus.objects.values_list('id', flat=True).all()).delete()
     26Job.objects.filter(...).exclude(id__in=JobStatus.objects.values_list('job_id', flat=True).all()).delete()
    2727}}}
Back to Top