refactor(User): rename current to is_current
This commit is contained in:
parent
396114fe00
commit
dc4c8feff5
3 changed files with 12 additions and 12 deletions
|
|
@ -174,7 +174,7 @@ class User(Document):
|
|||
"modified_by": session.user,
|
||||
"ip_address": data.session_ip,
|
||||
"last_updated": data.last_updated,
|
||||
"current": session.sid == frappe.session.sid,
|
||||
"is_current": session.sid == frappe.session.sid,
|
||||
"session_created": data.creation,
|
||||
"user_agent": data.user_agent,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"id",
|
||||
"current",
|
||||
"is_current",
|
||||
"ip_address",
|
||||
"user_agent",
|
||||
"column_break_cjgl",
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
"label": "Last Updated"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:!doc.current",
|
||||
"depends_on": "eval:!doc.is_current",
|
||||
"fieldname": "sign_out",
|
||||
"fieldtype": "Button",
|
||||
"label": "Sign Out"
|
||||
|
|
@ -55,17 +55,17 @@
|
|||
"fieldtype": "Section Break",
|
||||
"label": "Actions"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "current",
|
||||
"fieldtype": "Check",
|
||||
"in_list_view": 1,
|
||||
"label": "Current?"
|
||||
},
|
||||
{
|
||||
"fieldname": "user_agent",
|
||||
"fieldtype": "Small Text",
|
||||
"label": "User Agent"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "is_current",
|
||||
"fieldtype": "Check",
|
||||
"in_list_view": 1,
|
||||
"label": "Is Current"
|
||||
}
|
||||
],
|
||||
"grid_page_length": 50,
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
"is_virtual": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2025-09-10 11:38:09.491850",
|
||||
"modified": "2025-09-10 11:43:47.325045",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "User Session Display",
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ class UserSessionDisplay(Document):
|
|||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
current: DF.Check
|
||||
id: DF.Data | None
|
||||
ip_address: DF.Data | None
|
||||
is_current: DF.Check
|
||||
last_updated: DF.Datetime | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue