fix values

This commit is contained in:
CHIEFSOFT\ameye
2024-12-22 16:27:16 -05:00
parent 4ccc531c04
commit 2bf8a0a48c
+1 -1
View File
@@ -381,7 +381,7 @@ def recent_actions(current_user):
user_id = current_user["user"]["id"]
# FIND_USER_DETAIL= "SELECT id,uid,username,updated,email,account_name, firstname, lastname FROM members WHERE uid::text = '"+user_uid+"'"
# RECENT_ACTIONS = "SELECT * FROM members_actions WHERE member_id = " + user_id + " ORDER by id DESC LIMIT 4"
RECENT_ACTIONS = "SELECT * FROM members_actions WHERE member_id = %s ORDER by id DESC LIMIT 4"
RECENT_ACTIONS = "SELECT * FROM members_actions WHERE member_id::text = %s ORDER by id DESC LIMIT 4"
actionVal = (user_id)
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
cursor.execute(RECENT_ACTIONS,actionVal)