refactor: Cleanup name confusion
Using `delete_session` name for a function and also as a method name is
confusing. Cleaned that up.
(cherry picked from commit 9200192c1c)
This commit is contained in:
parent
79233f007d
commit
bda37b541b
1 changed files with 3 additions and 4 deletions
|
|
@ -296,8 +296,7 @@ class Session:
|
|||
expiry = get_expiry_in_seconds(session_data.get("session_expiry"))
|
||||
|
||||
if self.time_diff > expiry:
|
||||
print('deleting...')
|
||||
self.delete_session()
|
||||
self._delete_session()
|
||||
data = None
|
||||
|
||||
return data and data.data
|
||||
|
|
@ -316,12 +315,12 @@ class Session:
|
|||
data = frappe._dict(eval(rec and rec[0][1] or '{}'))
|
||||
data.user = rec[0][0]
|
||||
else:
|
||||
self.delete_session()
|
||||
self._delete_session()
|
||||
data = None
|
||||
|
||||
return data
|
||||
|
||||
def delete_session(self):
|
||||
def _delete_session(self):
|
||||
delete_session(self.sid, reason="Session Expired")
|
||||
|
||||
def start_as_guest(self):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue