|
@@ -119,18 +119,18 @@ class EmField(EmComponent):
|
119
|
119
|
#
|
120
|
120
|
# @return Name of the table
|
121
|
121
|
def _get_class_table_db(self):
|
122
|
|
- dbe = self.getDbE()
|
|
122
|
+ dbe = self.db_engine()
|
123
|
123
|
conn = dbe.connect()
|
124
|
|
- fieldtable = sql.Table(EmField.table, sqlutils.meta(dbe))
|
|
124
|
+ #fieldtable = sql.Table(EmField.table, sqlutils.meta(dbe))
|
125
|
125
|
fieldgrouptable = sql.Table(EmFieldGroup.table, sqlutils.meta(dbe))
|
126
|
|
- reqGetClassId = fieldgrouptable.select().where(fieldgrouptable.c.uid == self.fieldgroup_id)
|
127
|
|
- resGetClassId = conn.execute(reqGetClassId).fetchall()
|
128
|
|
- class_id = dict(zip(resGetClassId[0].keys(), resGetClassId[0]))['class_id']
|
|
126
|
+ request_get_class_id = fieldgrouptable.select().where(fieldgrouptable.c.uid == self.fieldgroup_id)
|
|
127
|
+ result_get_class_id = conn.execute(request_get_class_id).fetchall()
|
|
128
|
+ class_id = dict(zip(result_get_class_id[0].keys(), result_get_class_id[0]))['class_id']
|
129
|
129
|
|
130
|
|
- classtable = sql.Table(EmClass.table, sqlutils.meta(dbe))
|
131
|
|
- reqGetClassTable = classtable.select().where(classtable.c.uid == class_id)
|
132
|
|
- resGetClassTable = conn.execute(reqGetClassTable).fetchall()
|
133
|
|
- classTableName = dict(zip(resGetClassTable[0].keys(), resGetClassTable[0]))['name']
|
|
130
|
+ class_table = sql.Table(EmClass.table, sqlutils.meta(dbe))
|
|
131
|
+ request_get_class_table = class_table.select().where(class_table.c.uid == class_id)
|
|
132
|
+ result_get_class_table = conn.execute(request_get_class_table).fetchall()
|
|
133
|
+ class_table_name = dict(zip(result_get_class_table[0].keys(), result_get_class_table[0]))['name']
|
134
|
134
|
|
135
|
|
- return classTableName
|
|
135
|
+ return class_table_name
|
136
|
136
|
|