don't attempt to add a membership if one is not provided
parent
4e5bf29eb4
commit
24dbd72f4d
|
@ -47,7 +47,8 @@ def add_account(db, **overrides):
|
|||
acct_repository = AccountRepository(db)
|
||||
account = build_test_account(**overrides)
|
||||
account.id = acct_repository.add(account, 'foo')
|
||||
acct_repository.add_membership(account.id, account.membership)
|
||||
if account.membership is not None:
|
||||
acct_repository.add_membership(account.id, account.membership)
|
||||
|
||||
return account
|
||||
|
||||
|
|
Loading…
Reference in New Issue