Skip to content

Commit

Permalink
[#2394] Fix bug with creating users, introduced in previous commit.
Browse files Browse the repository at this point in the history
Picked from release-dgu1 branch
  • Loading branch information
amercader committed May 23, 2012
1 parent a00c649 commit cd5caba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/lib/create_test_data.py
Expand Up @@ -523,7 +523,7 @@ def create_users(cls, user_dicts):

@classmethod
def _create_user_without_commit(cls, name='', **user_dict):
if model.User.by_name(name) or model.User.by_openid(user_dict.get('openid')):
if model.User.by_name(name) or (user_dict.get('openid') and model.User.by_openid(user_dict.get('openid'))):
log.warning('Cannot create user "%s" as it already exists.' % \
(name or user_dict['name']))
return
Expand Down

0 comments on commit cd5caba

Please sign in to comment.