view website/issues/detectors/statusauditor.py @ 6380:d76291836523

Fix issue2551128 - Impossible to validate a user with unknown timezone Raise KeyError when an unrecognized timezones is passed to pytz. (patch Cedric Krier, test John Rouillard)
author John Rouillard <rouilj@ieee.org>
date Sun, 18 Apr 2021 17:39:44 -0400
parents 0942fe89e82e
children 13e8f188f8dd
line wrap: on
line source

def preset_new(db, cl, nodeid, newvalues):
    """ Make sure the status is set on new issues"""

    if 'status' in newvalues and newvalues['status']:
        return

    new = db.status.lookup('new')
    newvalues['status'] = new


def init(db):
    # fire before changes are made
    db.issue.audit('create', preset_new)

Roundup Issue Tracker: http://roundup-tracker.org/