@@ -91,7 +91,7 @@ def getAsociaciones(self):
91
91
while row is not None :
92
92
asociacion = Asociacion ()
93
93
asociacion .id_asignatura = row [0 ]
94
- asociacion .id_curso = row [1 ]
94
+ asociacion .id_clase = row [1 ]
95
95
96
96
lista .append (asociacion )
97
97
#print row[0], row[1]
@@ -142,7 +142,7 @@ def getAsociacion(self, id_clase, id_asignatura):
142
142
#La api del mservicio envia estos datos en JSON sin comprobar nada
143
143
asociacion = Asociacion ()
144
144
asociacion .id_asignatura = row [0 ]
145
- asociacion .id_curso = row [1 ]
145
+ asociacion .id_clase = row [1 ]
146
146
147
147
return asociacion
148
148
if salida == 0 :
@@ -194,12 +194,12 @@ def modAsociacion(self, id_asignatura, id_clase, campoACambiar, nuevoValor):
194
194
return 'Elemento no encontrado'
195
195
196
196
@classmethod
197
- def delAsociacion (self , id_asignatura , id_curso ):
197
+ def delAsociacion (self , id_asignatura , id_clase ):
198
198
db = MySQLdb .connect (host = "localhost" , user = "root" , passwd = "root" , db = "smm" ); #La conexión está clara.
199
199
cursor = db .cursor ()
200
200
id_asignatura = '\' ' + id_asignatura + '\' '
201
- id_curso = '\' ' + id_curso + '\' '
202
- query = "delete from Asocia where id_asignatura=" + id_asignatura + " and id_curso =" + id_curso + ";"
201
+ id_clase = '\' ' + id_clase + '\' '
202
+ query = "delete from Asocia where id_asignatura=" + id_asignatura + " and id_clase =" + id_clase + ";"
203
203
if v :
204
204
print query
205
205
salida = ''
0 commit comments