Simplify query
This commit is contained in:
		
							parent
							
								
									829b939273
								
							
						
					
					
						commit
						9b414339ca
					
				@ -33,7 +33,7 @@ class auth:
 | 
				
			|||||||
        self.cursor.execute("BEGIN;")
 | 
					        self.cursor.execute("BEGIN;")
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            loggorilla.prcss(APIADDR, "Get dependency data")
 | 
					            loggorilla.prcss(APIADDR, "Get dependency data")
 | 
				
			||||||
            self.cursor.execute(f"SELECT id, name FROM `auth_roles` WHERE auth_roles.name = %s ; ", (roles,) )
 | 
					            self.cursor.execute(f"SELECT `id` FROM `auth_roles` WHERE `name` = %s ;", (roles,) )
 | 
				
			||||||
            result_roles = self.cursor.fetchone()
 | 
					            result_roles = self.cursor.fetchone()
 | 
				
			||||||
            loggorilla.prcss(APIADDR, "Process parameters")
 | 
					            loggorilla.prcss(APIADDR, "Process parameters")
 | 
				
			||||||
            hashed	= bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
 | 
					            hashed	= bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user