From 4e131b09b538683bfe5b955574b7103b5aa8501a Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 25 Jul 2019 16:14:05 -0500 Subject: [PATCH] Cleanup attribute names for Subdepartment model --- corepos/db/model.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/corepos/db/model.py b/corepos/db/model.py index eded94a..819f78d 100644 --- a/corepos/db/model.py +++ b/corepos/db/model.py @@ -84,11 +84,11 @@ class Subdepartment(Base): 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, doc=""" @@ -96,7 +96,7 @@ class Subdepartment(Base): """) def __str__(self): - return self.subdept_name or '' + return self.name or '' @six.python_2_unicode_compatible