Merge pull request #48 from coreos-inc/nobots
Change API calls that expect non-robots to explicitly filter
This commit is contained in:
commit
42da017d69
6 changed files with 21 additions and 14 deletions
|
@ -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)
|
||||
|
|
Reference in a new issue