remove quotes in has_table_privilege and has_database_privilege
This commit is contained in:
parent
2bb74e5f29
commit
329b2c63d9
1 changed files with 2 additions and 2 deletions
|
@ -185,7 +185,7 @@ def user_delete(cursor, user):
|
|||
return True
|
||||
|
||||
def has_table_privilege(cursor, user, table, priv):
|
||||
query = 'SELECT has_table_privilege(\'%s\', \'%s\', \'%s\')'
|
||||
query = 'SELECT has_table_privilege(%s, %s, %s)'
|
||||
cursor.execute(query, (user, table, priv))
|
||||
return cursor.fetchone()[0]
|
||||
|
||||
|
@ -235,7 +235,7 @@ def get_database_privileges(cursor, user, db):
|
|||
return o
|
||||
|
||||
def has_database_privilege(cursor, user, db, priv):
|
||||
query = 'SELECT has_database_privilege(\'%s\', \'%s\', \'%s\')'
|
||||
query = 'SELECT has_database_privilege(%s, %s, %s)'
|
||||
cursor.execute(query, (user, db, priv))
|
||||
return cursor.fetchone()[0]
|
||||
|
||||
|
|
Loading…
Reference in a new issue