[Tracker-discuss] [issue654] Add triager icon

Berker Peksag metatracker at psf.upfronthosting.co.za
Tue Jun 12 10:59:50 EDT 2018


Berker Peksag <berker.peksag at gmail.com> added the comment:

I tried to copy is_coordinator() first, but request.client.userid gives the ID of the user who made the request, so it would return invalid results.

Did you get the traceback on production? Is it possible to add a print to see the userid?

Also, I can be more defensive and change the code to avoid TypeError:

def is_triager(request, userid):
    db = request.client.db
    query = db.user.get(userid, 'roles')
    if query is None:
        return False
    return 'Developer' in query

_______________________________________________________
PSF Meta Tracker <metatracker at psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue654>
_______________________________________________________


More information about the Tracker-discuss mailing list