summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2019-01-24 14:48:46 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2019-01-24 14:48:46 +0100
commitbc03f679477a1f47535f543ebd10d92c15b9b933 (patch)
tree24eabcf8f38c93e7f6bdeaa622fd5a0dc78339b1
parent92b45b2f110a98589289cfc3e317670e6ff0a49d (diff)
downloadbank-bc03f679477a1f47535f543ebd10d92c15b9b933.tar.gz
bank-bc03f679477a1f47535f543ebd10d92c15b9b933.tar.bz2
bank-bc03f679477a1f47535f543ebd10d92c15b9b933.zip
Make big donation just once!
-rw-r--r--talerbank/app/management/commands/provide_accounts.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/talerbank/app/management/commands/provide_accounts.py b/talerbank/app/management/commands/provide_accounts.py
index 4a6c545..b8c84e5 100644
--- a/talerbank/app/management/commands/provide_accounts.py
+++ b/talerbank/app/management/commands/provide_accounts.py
@@ -3,7 +3,8 @@
#
# TALER is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 3, or (at your option) any later version.
+# published by the Free Software Foundation; either version 3,
+# or (at your option) any later version.
#
# TALER is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -41,6 +42,14 @@ def make_account(username):
username=username, password='x'),
is_public=True).save()
+ if "Survey" == username:
+ bank = BankAccount.objects.get(account_no=1)
+ survey = BankAccount.objects.get(account_no=8)
+ wire_transfer(Amount(settings.TALER_CURRENCY, 10000000),
+ bank,
+ survey,
+ "Benevolent donation for 'Survey'")
+
except (OperationalError, ProgrammingError):
LOGGER.error("db does not exist, or the project"
" is not migrated. Try 'taler-bank-manage"
@@ -49,14 +58,6 @@ def make_account(username):
exc_info=True)
sys.exit(1)
- if "Survey" == username:
- bank = BankAccount.objects.get(account_no=1)
- survey = BankAccount.objects.get(account_no=8)
- wire_transfer(Amount(settings.TALER_CURRENCY, 10000000),
- bank,
- survey,
- "Benevolent donation for 'Survey'")
-
class Command(BaseCommand):
help = "Provide initial user accounts"