[Commits] act-server branch master updated.
C. Scott Ananian
cscott at laptop.org
Fri Jan 9 19:25:44 EST 2009
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "/home/cscott/public_git/act-server".
The branch, master has been updated
via 0fe32e41a92340bf6f7abbeb5287ca83d1a9cf49 (commit)
from 7cd52cc6c2f725ef46a4ecde45ba114089492da2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
oats/request/views.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 0fe32e41a92340bf6f7abbeb5287ca83d1a9cf49
Author: C. Scott Ananian <cscott at laptop.org>
Date: Fri Jan 9 19:25:17 2009 -0500
Catch errors caused by bad UUIDs in our manufacturing database.
diff --git a/oats/request/views.py b/oats/request/views.py
index 1ae813e..74e5c6b 100644
--- a/oats/request/views.py
+++ b/oats/request/views.py
@@ -175,6 +175,11 @@ class CreateRequestForm(forms.Form):
except Laptop.DoesNotExist:
add_error(_('No UUID known for serial number.'))
continue
+ try:
+ validate_uuid(l.uuid) # some bad entries in our db =(
+ except forms.ValidationError:
+ add_error(_('Bad UUID for serial number: %s') % serial_num)
+ continue
uuid = l.uuid
curtime = datetime.utcnow()
elif len(fields)==3:
-----------------------------------------------------------------------
--
/home/cscott/public_git/act-server
More information about the Commits
mailing list