fix get_or_create_user

This commit is contained in:
Cayo Puigdefabregas 2022-02-22 11:31:11 +01:00
parent 88deb71a26
commit 90eb279008
1 changed files with 2 additions and 2 deletions

View File

@ -736,7 +736,7 @@ class TradeForm(NewActionForm):
# Create receiver (to) phantom account
if user_from and not user_to:
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_to = user
return
@ -744,7 +744,7 @@ class TradeForm(NewActionForm):
# Create supplier (from) phantom account
if not user_from and 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_to = g.user