fix: Add quotes
This commit is contained in:
parent
e3d0a84e64
commit
42b6faabe7
1 changed files with 9 additions and 5 deletions
|
|
@ -231,11 +231,15 @@ class Session:
|
|||
self.insert_session_record()
|
||||
|
||||
# update user
|
||||
frappe.db.sql("""UPDATE tabUser SET last_login = %(now)s, last_ip = %(ip)s, last_active = %(now)s
|
||||
where name=%(name)s""", {
|
||||
"now": frappe.utils.now(),
|
||||
"ip": frappe.local.request_ip,
|
||||
"name": self.data['user']
|
||||
frappe.db.sql("""UPDATE `tabUser`
|
||||
SET
|
||||
last_login = %(now)s,
|
||||
last_ip = %(ip)s,
|
||||
last_active = %(now)s
|
||||
WHERE name=%(name)s""", {
|
||||
'now': frappe.utils.now(),
|
||||
'ip': frappe.local.request_ip,
|
||||
'name': self.data['user']
|
||||
})
|
||||
|
||||
frappe.db.commit()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue