Mercurial > p > roundup > code
view website/issues/detectors/statusauditor.py @ 5728:bfd28644fe43
In suggestion from Joseph Myers, put test code in a try: finally: block
to make sure that patching of date.Date is undone if there is an
exception.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Fri, 24 May 2019 17:23:08 -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)
