Merge pull request #48 from coreos-inc/nobots

Change API calls that expect non-robots to explicitly filter
This commit is contained in:
Jake Moshenko 2015-06-02 12:31:19 -04:00
commit 42da017d69
6 changed files with 21 additions and 14 deletions

View file

@ -642,6 +642,13 @@ def find_user_by_email(email):
return None
def get_nonrobot_user(username):
try:
return User.get(User.username == username, User.organization == False, User.robot == False)
except User.DoesNotExist:
return None
def get_user(username):
try:
return User.get(User.username == username, User.organization == False)