[Python-checkins] r60866 - tracker/instances/jobs/detectors/statusauditor.py
martin.v.loewis
python-checkins at python.org
Sat Feb 16 20:07:56 CET 2008
Author: martin.v.loewis
Date: Sat Feb 16 20:07:56 2008
New Revision: 60866
Modified:
tracker/instances/jobs/detectors/statusauditor.py
Log:
Do not complain if no attempt to change the status is made.
Modified: tracker/instances/jobs/detectors/statusauditor.py
==============================================================================
--- tracker/instances/jobs/detectors/statusauditor.py (original)
+++ tracker/instances/jobs/detectors/statusauditor.py Sat Feb 16 20:07:56 2008
@@ -14,10 +14,12 @@
def audit_status(db, cl, nodeid, newvalues):
"Prevent regular users from posting their offers themselves."
- user = db.getuid()
+ if not newvalues.has_key('status'):
+ return
if (newvalues.has_key('status') and
db.status.get(newvalues['status'], 'name') != 'posted'):
return
+ user = db.getuid()
if db.user.get(user, 'roles').lower().find('editor') != -1:
# Ok if an editor posted it; set the posting date
newvalues['posted'] = roundup.date.Date()
More information about the Python-checkins
mailing list