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'),