Cleanup attribute names for Subdepartment model

This commit is contained in:
Lance Edgar 2019-07-25 16:14:05 -05:00
parent e046ecf254
commit 4e131b09b5

View file

@ -84,11 +84,11 @@ class Subdepartment(Base):
sa.ForeignKeyConstraint(['dept_ID'], ['departments.dept_no']), sa.ForeignKeyConstraint(['dept_ID'], ['departments.dept_no']),
) )
subdept_no = sa.Column(sa.SmallInteger(), primary_key=True, autoincrement=False, nullable=False) number = sa.Column('subdept_no', sa.SmallInteger(), primary_key=True, autoincrement=False, nullable=False)
subdept_name = sa.Column(sa.String(length=30), nullable=True) name = sa.Column('subdept_name', sa.String(length=30), nullable=True)
dept_ID = sa.Column(sa.SmallInteger(), nullable=True) department_number = sa.Column('dept_ID', sa.SmallInteger(), nullable=True)
department = orm.relationship( department = orm.relationship(
Department, Department,
doc=""" doc="""
@ -96,7 +96,7 @@ class Subdepartment(Base):
""") """)
def __str__(self): def __str__(self):
return self.subdept_name or '' return self.name or ''
@six.python_2_unicode_compatible @six.python_2_unicode_compatible