Created
May 15, 2019 20:58
-
-
Save moacirmoda/bdec5a1d1980481bf228179a8dd32f1b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rider.models import * | |
rides_with_ck_ids = CheckRide.objects.all().values_list('ride_id', flat=True) | |
rides_ids = Ride.objects.all().values_list('id', flat=True) | |
rides_without_ck_ids = [] | |
for id in rides_ids: | |
if id not in rides_with_ck_ids: | |
rides_without_ck_ids.append(id) | |
print(rides_without_ck_ids) | |
rides = Ride.objects.filter(ckride__isnull=True).count() | |
print([ride.id for ride in rides]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment