From fbedbc8f7fda62572c02a47bc079537442f9c2a2 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Tue, 22 Feb 2022 12:22:23 +0100 Subject: [PATCH] Drop Additional keyword arguments [Deprecated since version 0.9](https://docs.sqlalchemy.org/en/12/core/type_basics.html#sqlalchemy.types.Float.params.**kwargs) --- ereuse_devicehub/resources/action/models.py | 2 +- ereuse_devicehub/resources/tradedocument/models.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ereuse_devicehub/resources/action/models.py b/ereuse_devicehub/resources/action/models.py index a213ced5..6fc039aa 100644 --- a/ereuse_devicehub/resources/action/models.py +++ b/ereuse_devicehub/resources/action/models.py @@ -1748,7 +1748,7 @@ class MoveOnDocument(JoinedTableMixin, ActionWithMultipleTradeDocuments): """Action than certify one movement of some indescriptible material of one container to an other.""" - weight = db.Column(db.Float(nullable=True)) + weight = db.Column(db.Float()) weight.comment = """Weight than go to recycling""" container_from_id = db.Column( db.BigInteger, diff --git a/ereuse_devicehub/resources/tradedocument/models.py b/ereuse_devicehub/resources/tradedocument/models.py index 177b2bd3..59d8a8c4 100644 --- a/ereuse_devicehub/resources/tradedocument/models.py +++ b/ereuse_devicehub/resources/tradedocument/models.py @@ -72,7 +72,7 @@ class TradeDocument(Thing): file_hash.comment = """This is the hash of the file produced from frontend.""" url = db.Column(URL()) url.comment = """This is the url where resides the document.""" - weight = db.Column(db.Float(nullable=True)) + weight = db.Column(db.Float()) weight.comment = """This is the weight of one container than this document express.""" __table_args__ = ( @@ -150,10 +150,10 @@ class TradeDocument(Thing): with suppress(StopIteration, ValueError): actions = copy.copy(self.actions) actions.sort(key=lambda x: x.created) - t_trades = ['Trade', - 'Confirm', - 'ConfirmRevokeDocument', - 'RevokeDocument', + t_trades = ['Trade', + 'Confirm', + 'ConfirmRevokeDocument', + 'RevokeDocument', 'ConfirmDocument'] return next(e for e in reversed(actions) if e.t in t_trades)