fix get_or_create_user
This commit is contained in:
parent
88deb71a26
commit
90eb279008
|
@ -736,7 +736,7 @@ class TradeForm(NewActionForm):
|
||||||
# Create receiver (to) phantom account
|
# Create receiver (to) phantom account
|
||||||
if user_from and not user_to:
|
if user_from and not user_to:
|
||||||
assert g.user.email == user_from
|
assert g.user.email == user_from
|
||||||
user = self.create_user(code)
|
user = self.get_or_create_user(code)
|
||||||
self.user_from = g.user
|
self.user_from = g.user
|
||||||
self.user_to = user
|
self.user_to = user
|
||||||
return
|
return
|
||||||
|
@ -744,7 +744,7 @@ class TradeForm(NewActionForm):
|
||||||
# Create supplier (from) phantom account
|
# Create supplier (from) phantom account
|
||||||
if not user_from and user_to:
|
if not user_from and user_to:
|
||||||
assert g.user.email == user_to
|
assert g.user.email == user_to
|
||||||
user = self.create_user(code)
|
user = self.get_or_create_user(code)
|
||||||
self.user_from = user
|
self.user_from = user
|
||||||
self.user_to = g.user
|
self.user_to = g.user
|
||||||
|
|
||||||
|
|
Reference in New Issue