commit | 45fea9bd78919484cfa37be24b29d6e64a85f0a6 | [log] [tgz] |
---|---|---|
author | Tony Mack <tmack@paris.CS.Princeton.EDU> | Tue Apr 09 20:26:39 2013 -0400 |
committer | Tony Mack <tmack@paris.CS.Princeton.EDU> | Tue Apr 09 20:26:39 2013 -0400 |
tree | a324f174f9274f55ae0b95d0d5a8983aba3effe3 | |
parent | 7d97f06e4cfdf4249d6384e41208d7bc0ece202a [diff] [blame] |
raise exception if user cannot be found
diff --git a/plstackapi/core/api/keys.py b/plstackapi/core/api/keys.py index af21f41..b255e98 100644 --- a/plstackapi/core/api/keys.py +++ b/plstackapi/core/api/keys.py
@@ -12,6 +12,8 @@ users = User.objects.filter(email=fields['user']) if users: user = users[0] + if not user: + raise Exception, "No such user: %s" % fields['user'] return user def add_key(auth, fields):