mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-16 08:05:00 +00:00
Merge pull request #49695 from frappe/mergify/bp/version-15-hotfix/pr-49694
chore: update sales_data from site_info (backport #49694)
This commit is contained in:
@@ -5,5 +5,6 @@ from erpnext.utilities.activation import get_level
|
||||
|
||||
class TestActivation(FrappeTestCase):
|
||||
def test_activation(self):
|
||||
levels = get_level()
|
||||
site_info = {"activation": {"activation_level": 0, "sales_data": []}}
|
||||
levels = get_level(site_info)
|
||||
self.assertTrue(levels)
|
||||
|
||||
@@ -37,7 +37,7 @@ def get_site_info(site_info):
|
||||
if company:
|
||||
domain = frappe.get_cached_value("Company", cstr(company), "domain")
|
||||
|
||||
return {"company": company, "domain": domain, "activation": get_level()}
|
||||
return {"company": company, "domain": domain, "activation": get_level(site_info)}
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
||||
@@ -9,9 +9,9 @@ from frappe.core.doctype.installed_applications.installed_applications import ge
|
||||
import erpnext
|
||||
|
||||
|
||||
def get_level():
|
||||
activation_level = 0
|
||||
sales_data = []
|
||||
def get_level(site_info):
|
||||
activation_level = site_info.get("activation", {}).get("activation_level", 0)
|
||||
sales_data = site_info.get("activation", {}).get("sales_data", [])
|
||||
min_count = 0
|
||||
doctypes = {
|
||||
"Asset": 5,
|
||||
|
||||
Reference in New Issue
Block a user