minor fix for function import
This commit is contained in:
parent
67ce410824
commit
ec42dcd4f7
1 changed files with 2 additions and 1 deletions
|
|
@ -7,7 +7,6 @@ import frappe, json
|
|||
from frappe import _dict
|
||||
import frappe.share
|
||||
from frappe.utils import cint
|
||||
from frappe.core.doctype.user.user import get_total_users
|
||||
|
||||
class UserPermissions:
|
||||
"""
|
||||
|
|
@ -344,6 +343,8 @@ def disable_users(limits=None):
|
|||
for user in active_users:
|
||||
frappe.db.set_value("User", user, 'enabled', 0)
|
||||
|
||||
from frappe.core.doctype.user.user import get_total_users
|
||||
|
||||
if get_total_users() > cint(limits.get('users')):
|
||||
reset_simultaneous_sessions(cint(limits.get('users')))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue