Browse Source

Update estudiante.py

Jose R Ortiz Ubarri 4 years ago
parent
commit
80e7f7382f
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      estudiante.py

+ 3
- 4
estudiante.py View File

@@ -15,8 +15,8 @@ def get(id):
15 15
 	query = query.select_from(usuarios.join(role, usuarios.columns.id == estudiantes.columns.user_id)).where(estudiantes.columns.user_id == id)
16 16
 	result = connection.execute(query).fetchall()
17 17
 
18
-	return [{"nombres": "Juana", "apellidos":"Del Barrio", "email": "juana1@gmail.com"},{"nombres": "Juana2", "apellidos":"Del Barrio", "email": "juana2@gmail.com"}]
19
-
18
+	return result
19
+	
20 20
 def list():
21 21
 	estudiantes = db.Table('estudiantes',  metadata, autoload=True, autoload_with=engine))
22 22
 	usuarios = db.Table('usuarios', metadata, autoload=True, autoload_with=engine)
@@ -24,8 +24,7 @@ def list():
24 24
 	query = query.select_from(usuarios.join(role, usuarios.columns.id == estudiantes.columns.user_id)) # .where(role.columns.user_id == self.id)
25 25
 	result = connection.execute(query).fetchall()
26 26
 
27
-	return [{"nombres": "Juana", "apellidos":"Del Barrio", "email": "juana1@gmail.com"},{"nombres": "Juana2", "apellidos":"Del Barrio", "email": "juana2@gmail.com"}]
28
-
27
+	return result
29 28
 
30 29
 
31 30
 def main()