From 4026c7705fbe3ad2a80d39679792f99e7cc5ad4c Mon Sep 17 00:00:00 2001 From: RmStorm Date: Tue, 12 Nov 2019 09:57:51 +0100 Subject: [PATCH] Fixed a bug where InstrumentOutputVariableID foreignkey was wrong --- odm2api/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odm2api/models.py b/odm2api/models.py index 82799e4..d96adb5 100644 --- a/odm2api/models.py +++ b/odm2api/models.py @@ -503,7 +503,7 @@ class DataLoggerFileColumns(Base): DataLoggerFileID = Column('dataloggerfileid', Integer, ForeignKey(DataLoggerFiles.DataLoggerFileID), nullable=False) InstrumentOutputVariableID = Column('instrumentoutputvariableid', Integer, - ForeignKey(InstrumentOutputVariables.VariableID), + ForeignKey(InstrumentOutputVariables.InstrumentOutputVariableID), nullable=False) ColumnLabel = Column('columnlabel', String(50), nullable=False) ColumnDescription = Column('columndescription', String(500)) @@ -617,7 +617,7 @@ class CalibrationActions(Base): ActionID = Column('actionid', Integer, ForeignKey(Actions.ActionID), primary_key=True, nullable=False) CalibrationCheckValue = Column('calibrationcheckvalue', Float(53)) InstrumentOutputVariableID = Column('instrumentoutputvariableid', Integer, - ForeignKey(InstrumentOutputVariables.VariableID), nullable=False) + ForeignKey(InstrumentOutputVariables.InstrumentOutputVariableID), nullable=False) CalibrationEquation = Column('calibrationequation', String(255)) ActionObj = relationship(Actions)