fixing foreingkey
This commit is contained in:
parent
e82358d5dc
commit
5799be2a3a
|
@ -66,13 +66,13 @@ class DataWipeDocument(JoinedTableMixin, Document):
|
||||||
return '{0.file_name}'.format(self)
|
return '{0.file_name}'.format(self)
|
||||||
|
|
||||||
|
|
||||||
from ereuse_devicehub.resources.tradedocument.models import TradeDocument
|
|
||||||
class RecycleDocument(JoinedTableMixin, Document):
|
class RecycleDocument(JoinedTableMixin, Document):
|
||||||
"""Document than proof how any of weight go to recycling."""
|
"""Document than proof how any of weight go to recycling."""
|
||||||
|
|
||||||
weight = db.Column(db.Float(nullable=True))
|
weight = db.Column(db.Float(nullable=True))
|
||||||
weight.comment = """Weight than go to recycling"""
|
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"""
|
trade_document_id.comment = """This is the trade document used for send material to recyle"""
|
||||||
lot_id = db.Column(UUID(as_uuid=True),
|
lot_id = db.Column(UUID(as_uuid=True),
|
||||||
db.ForeignKey('lot.id'),
|
db.ForeignKey('lot.id'),
|
||||||
|
|
Reference in New Issue