Krukov / amocrm_api

Python amocrm API wrapper
MIT License
103 stars 55 forks source link

Не работает Lead.objects.filter(pipeline = 4593160) #120

Closed NikolaiKryshnev closed 6 months ago

NikolaiKryshnev commented 6 months ago

Подскажите, пожалуйста, как правильно отфильтровать сделки по статусу?)

NikolaiKryshnev commented 6 months ago

Решение: leads_in_stage_filter = filters.FiltersByPipelineAndStatus("statuses") leads_in_stage_filter(pipline_id="4593160", status_id="65946994") leads = Lead.objects.filter(filters=(leads_in_stage_filter,))

    for lead in leads:
        logging.info(f"lead: {lead.id}")