fixing foreingkey

This commit is contained in:
Cayo Puigdefabregas 2021-08-10 13:56:33 +02:00
parent e82358d5dc
commit 5799be2a3a
1 changed files with 2 additions and 2 deletions

View File

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