commit | bb1bfc4e81680ff5a8c3b316f9d4d4b1bf9a5c0d | [log] [tgz] |
---|---|---|
author | Tony Mack <tmack@paris.CS.Princeton.EDU> | Tue Apr 09 20:24:27 2013 -0400 |
committer | Tony Mack <tmack@paris.CS.Princeton.EDU> | Tue Apr 09 20:24:27 2013 -0400 |
tree | 67d1ca8197dff7b7a692b2d1105e2a27918fc6a9 | |
parent | 140c47ceecf329034ba48f3d3b4a52d2d41cedc5 [diff] [blame] |
raise exception if site cannot be found
diff --git a/plstackapi/core/api/users.py b/plstackapi/core/api/users.py index 6862e30..09384f2 100644 --- a/plstackapi/core/api/users.py +++ b/plstackapi/core/api/users.py
@@ -12,6 +12,8 @@ sites = Site.objects.filter(login_base=fields['site']) if sites: site = sites[0] + if not site: + raise Exception, "No such site", fields['site'] return site def add_user(auth, fields):