diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index b51097d5..4271191b 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -727,9 +727,10 @@ class TradeForm(NewActionForm): code = self.code.data if user_from and user_to: + # both users exist, no further action is necessary return - # Creating receiver phantom account + # Create receiver (to) phantom account if user_from and not user_to: assert g.user.email == user_from user = self.create_user(code) @@ -737,7 +738,7 @@ class TradeForm(NewActionForm): self.user_to = user return - # Creating supplier phantom account + # Create supplier (from) phantom account if not user_from and user_to: assert g.user.email == user_to user = self.create_user(code)