From 5799be2a3a7144a2bcf41fb599df6e0419e9d187 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 10 Aug 2021 13:56:33 +0200 Subject: [PATCH] fixing foreingkey --- ereuse_devicehub/resources/documents/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/resources/documents/models.py b/ereuse_devicehub/resources/documents/models.py index bf2ae1a5..3deb9784 100644 --- a/ereuse_devicehub/resources/documents/models.py +++ b/ereuse_devicehub/resources/documents/models.py @@ -66,13 +66,13 @@ class DataWipeDocument(JoinedTableMixin, Document): return '{0.file_name}'.format(self) -from ereuse_devicehub.resources.tradedocument.models import TradeDocument + class RecycleDocument(JoinedTableMixin, Document): """Document than proof how any of weight go to recycling.""" weight = db.Column(db.Float(nullable=True)) weight.comment = """Weight than go to recycling""" - trade_document_id = db.Column(db.BigInteger, db.ForeignKey(TradeDocument.id)) + trade_document_id = db.Column(db.BigInteger, db.ForeignKey('trade_document.id')) trade_document_id.comment = """This is the trade document used for send material to recyle""" lot_id = db.Column(UUID(as_uuid=True), db.ForeignKey('lot.id'),