Your message dated Thu, 05 Sep 2019 11:33:20 +0000
with message-id <[email protected]>
and subject line Bug#935690 fixed in nm.debian.org
has caused the Debian Bug report #935690,
regarding nm.debian.org: one-click-emeritus doesn't work for people who already 
have a dd_e/dd_r closed process
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
935690: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935690
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: nm.debian.org
Severity: important

We now have a case of a person who wants to retire upon receiving a WAT
ping, but who already received and turned down a previos WAT ping.

This causes a 500 error trying to follow the tokenized url:

    Internal Server Error: /process/emeritus

    MultipleObjectsReturned at /process/emeritus
    get() returned more than one Process -- it returned 2!

    File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py" in 
inner
      42.             response = get_response(request)
    File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in 
_legacy_get_response
      249.             response = self._get_response(request)
    File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in 
_get_response
      187.                 response = self.process_exception_by_middleware(e, 
request)
    File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in 
_get_response
      185.                 response = wrapped_callback(request, *callback_args, 
**callback_kwargs)
    File "/usr/lib/python3/dist-packages/django/views/generic/base.py" in view
      68.             return self.dispatch(request, *args, **kwargs)
    File "/srv/nm.debian.org/nm2/backend/mixins.py" in dispatch
      66.             self.load_objects()
    File "/srv/nm.debian.org/nm2/process/views.py" in load_objects
      753.                 const.STATUS_EMERITUS_DD, const.STATUS_REMOVED_DD))
    File "/usr/lib/python3/dist-packages/django/db/models/manager.py" in 
manager_method
      85.                 return getattr(self.get_queryset(), name)(*args, 
**kwargs)
    File "/usr/lib/python3/dist-packages/django/db/models/query.py" in get
      389.             (self.model._meta.object_name, num)

Now, the issue is due to this query in process/views.py:

        try:
            self.process = pmodels.Process.objects.get(person=self.person, 
applying_for__in=(
                const.STATUS_EMERITUS_DD, const.STATUS_REMOVED_DD))
        except pmodels.Process.DoesNotExist:
            self.process = None

I tried to change that to filter out closed processes, but now I
understand that's not correct: the presence of a closed process is
considered as a sign that the process has already been processed and
therefore the applicant can't retire that way anymore.

It's unclear to me how it should behave in this situation:
 * the presence of an open process for dd_e/dd_r definitely means the
   applicant should be able to follow the one-click-emeritus url
 * the presence of one closed process doesn't necassarily mean the
   person is "too late": the closed process might be from an old
   process that is already long over and doens't matter anymore
 * but how to distiguish the previous case from a current dd_r process
   that has already been approved (besides, approved but not closed
   processes are not filtered currently, they probably should) and so
   the applicant can't do anything anymore?

-- 
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


--- End Message ---
--- Begin Message ---
Hello,

Bug #935690 in nm.debian.org reported by you has been fixed in the Git 
repository.
You can see the commit message below and you can check the diff of the fix at:

https://salsa.debian.org/nm-team/nm.debian.org/commit/c1ff955b2cda33205b367cc6760e8b15cb87193c

------------------------------------------------------------------------
Fixed one-click-emeritus expired status. Closes: #935690
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/935690

--- End Message ---

Reply via email to