Project

General

Profile

« Previous | Next » 

Revision de2cd187

Added by Serghei Mihai about 10 years ago

dossiers: the schedules with inactive workers are no more displayed for a patient

Closes #4735

View differences:

calebasse/dossiers/views.py
275 275
        else:
276 276
            state = current_state.status.name
277 277
        ctx['current_state'] = current_state
278
        print ctx
279
        print get_status(ctx, self.request.user)
278 280
        ctx['status'], ctx['hc_status'] = get_status(ctx, self.request.user)
279 281
        ctx['missing_policy'] = False
280 282
        if not self.object.policyholder or \
......
410 412
        ctx['next_rdvs'] = []
411 413
        Q = models.Q
412 414
        today = date.today()
413
        qs = EventWithAct.objects.filter(patient=ctx['object']) \
415
        qs = EventWithAct.objects.filter(patient=ctx['object'], participants__worker__enabled=True) \
414 416
                .filter(exception_to__isnull=True, canceled=False) \
415 417
                .filter(Q(start_datetime__gte=today) \
416 418
                |  Q(exceptions__isnull=False) \

Also available in: Unified diff