[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-bank] 08/09: linting models. WARNING/NOTE: tests pas
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-bank] 08/09: linting models. WARNING/NOTE: tests passed but this change altered - although did NOT break - the recommended way to use the model API. |
Date: |
Tue, 05 Dec 2017 13:21:50 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository bank.
commit d459d637682f29685d4b06943319b72026d186dd
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Dec 5 13:10:23 2017 +0100
linting models. WARNING/NOTE: tests passed but this change
altered - although did NOT break - the recommended way to use
the model API.
---
talerbank/app/models.py | 7 +++----
talerbank/app/views.py | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/talerbank/app/models.py b/talerbank/app/models.py
index fb86f41..7ec54cb 100644
--- a/talerbank/app/models.py
+++ b/talerbank/app/models.py
@@ -26,9 +26,6 @@ class AmountField(models.Field):
description = 'Amount object in Taler style'
- def __init__(self, *args, **kwargs):
- super(AmountField, self).__init__(*args, **kwargs)
-
def deconstruct(self):
name, path, args, kwargs = super(AmountField, self).deconstruct()
return name, path, args, kwargs
@@ -42,7 +39,9 @@ class AmountField(models.Field):
return "%s:0.0" % settings.TALER_CURRENCY
return value.stringify(settings.TALER_DIGITS)
- def from_db_value(self, value, *args):
+ @staticmethod
+ def from_db_value(value, *args):
+ del args # pacify PEP checkers
if None is value:
return amount.Amount.parse(settings.TALER_CURRENCY)
return amount.Amount.parse(value)
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index eebb49f..7f8aed4 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -530,7 +530,7 @@ def wire_transfer_exc_handler(view_func):
return wraps(view_func)(_decorator)
@wire_transfer_exc_handler
-def wire_transfer(amount, debit_account, credit_account, subject):
+def wire_transfer(amount, debit_account, credit_account, subject, **kwargs):
LOGGER.info("%s => %s, %s, %s" %
(debit_account.account_no,
credit_account.account_no,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-bank] branch master updated (c8f9b7a -> 3d1d4bb), gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 04/09: remove fixme, gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 02/09: provide __str__ to custom exceptions, gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 09/09: remove initial checks. They pollute tests, and the way the bank is launched makes sure they always pass. Moreover, they check for obvious conditions like: is a 'Bank' user present? Is a database accessible?, gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 03/09: linting, gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 07/09: default log level = warning, gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 05/09: done linting talerconfig, gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 08/09: linting models. WARNING/NOTE: tests passed but this change altered - although did NOT break - the recommended way to use the model API.,
gnunet <=
- [GNUnet-SVN] [taler-bank] 01/09: port to django2, gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 06/09: linting done with views, gnunet, 2017/12/05