Fix the Department.tax_rate relationship

whoops i mistook `dept_tax` for a boolean previously
This commit is contained in:
Lance Edgar 2023-10-11 18:36:12 -05:00
parent 7171531dce
commit 3a3fba19e4

View file

@ -225,12 +225,18 @@ class Department(Base):
Represents a department within the organization.
"""
__tablename__ = 'departments'
__table_args__ = (
sa.ForeignKeyConstraint(['dept_tax'], ['taxrates.id']),
)
number = sa.Column('dept_no', sa.SmallInteger(), primary_key=True, autoincrement=False, nullable=False)
name = sa.Column('dept_name', sa.String(length=30), nullable=True)
tax = sa.Column('dept_tax', sa.Boolean(), nullable=True)
tax_rate_id = sa.Column('dept_tax', sa.SmallInteger(), nullable=True)
tax_rate = orm.relationship('TaxRate')
# TODO: deprecate / remove this
tax = orm.synonym('tax_rate_id')
food_stampable = sa.Column('dept_fs', sa.Boolean(), nullable=True)