Что не так с этим запросом в Джагно

def get_available_working_hours(location_id, date, appointment_type): providers = get_availabe_providers(location_id, appointment_type.id).values_list('id', flat=True) _workinghours = WorkingHour.objects.filter( Q(week_days__contains=[date.weekday()]) | Q(date__lte=date) & Q(конечная_дата__gte=дата), location_id=location_id, provider_id__in=providers ).distinct().values( 'start_time', 'end_time', 'provider_id' )

workinghours = normalize_datetime(date, _workinghours)
# print(workinghours)
_blockhours = BlockHour.objects.filter(
    provider_id__in=providers,
    location_id=location_id,
    date=date
).values(
    'start_time', 'end_time', 'provider_id'
)
blockhours = normalize_datetime(date, _blockhours)
Вернуться на верх