Eren Yilmaz преди 5 години
родител
ревизия
8eb20e666f
променени са 2 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 1 1
      client_controller.py
  2. 2 2
      model.py

+ 1 - 1
client_controller.py

@@ -163,7 +163,7 @@ def depot():
                           tablefmt="pipe",
                           floatfmt='.2f'))
         wealth = response['own_wealth']
-        print(f'This corresponds to a wealth of roughly {wealth}.')
+        print(f'Taking into account the amount of loans you have, this results in a wealth of roughly {wealth}.')
         if response['banking_license']:
             print(f'Also, you have a banking license.')
     else:

+ 2 - 2
model.py

@@ -1009,7 +1009,7 @@ def user_wealth(user_id):
         ), 0)
         FROM loans
         WHERE loans.user_id = ?)
-        ''', (currency_id(), user_id,))
+        ''', (currency_id(), user_id, user_id,))
 
     return current_cursor.fetchone()[0]
 
@@ -1358,7 +1358,7 @@ def repay_loan(loan_id, amount, known_user_id=None):
         execute('''
             DELETE FROM loans
             WHERE rowid = ?
-            ''', (loan_id, ))
+            ''', (loan_id,))
 
 
 def take_out_personal_loan(user_id, amount):