On Mon, Oct 22, 2018 at 12:34:06PM -0400, Alexandre Viau wrote:
> I have processed two applicants and their process status is now "Closed".
> 
> However, my AM profile still says "0 applicants processed".


In [1]: import backend.models as bmodels

In [2]: from django.db.models import Min, Max

In [3]: am = 
bmodels.AM.objects.get(person=bmodels.Person.objects.get(uid='aviau'))

In [4]: am
Out[4]: b'Alexandre Viau' <av...@debian.org> [uid:aviau, status:dd_u] a-- 
slots:1

In [5]: am.processed.annotate(started=Min("log__logdate"), 
ended=Max("log__logdate")).order_by('is_active', 'ended')
Out[5]: <QuerySet []>

this is what the code does, and as you can see apparently it believes
you processed nobody there.

In [17]: import process.models as pmodels

In [18]: pmodels.Process.objects.filter(ams__am=am).distinct()
Out[18]: <QuerySet [<Process: Valentin Vidic <valentin.vi...@carnet.hr> to 
become dd_u>, <Process: Nicolas Braud-Santoni <nico...@braud-santoni.eu> to 
become dd_u>, <Process: Philippe Thierry <p...@reseau-libre.net> to become 
dd_u>]>

here instead it finds the 3 applicants by you, which are properly listed
in the table in your profile.


tbh I can't really see where that "processed" property is coming from,
so I'm unable to follow it for now.

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

Attachment: signature.asc
Description: PGP signature

Reply via email to