diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/app_wallet.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/app_wallet.py b/app/app_wallet.py index 922c683..9154dcc 100644 --- a/app/app_wallet.py +++ b/app/app_wallet.py | |||
@@ -51,6 +51,9 @@ def wallet_transfer( | |||
51 | if recipient_user is None: | 51 | if recipient_user is None: |
52 | raise LookupError('Could not find recipient') | 52 | raise LookupError('Could not find recipient') |
53 | 53 | ||
54 | if recipient_user.id == session.get_user_id(): | ||
55 | raise LookupError('Cannot transfer money to oneself.') | ||
56 | |||
54 | tx.transfer( | 57 | tx.transfer( |
55 | from_user_id=session.get_user_id(), | 58 | from_user_id=session.get_user_id(), |
56 | to_user_id=recipient_user.id, | 59 | to_user_id=recipient_user.id, |