mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 03:01:22 +00:00
fix: Raise exception if apps are on incompatible branches
This commit is contained in:
@@ -144,4 +144,15 @@ def is_member():
|
||||
last_membership = get_last_membership()
|
||||
if last_membership and getdate(last_membership.to_date) > getdate():
|
||||
return True
|
||||
return False
|
||||
return False
|
||||
|
||||
def check_branch_compatibility_with_frappe():
|
||||
from frappe.utils.change_log import get_versions
|
||||
versions = get_versions()
|
||||
frappe_branch = versions["frappe"]["branch"]
|
||||
erpnext_branch = versions["erpnext"]["branch"]
|
||||
|
||||
if frappe_branch in ("hotfix", "master") and erpnext_branch == "develop":
|
||||
raise frappe.IncompatibleApp("Frappe is on branch: {} and ERPNext is on branch: {}".format(frappe_branch, erpnext_branch))
|
||||
if erpnext_branch in ("hotfix", "master") and frappe_branch == "develop":
|
||||
raise frappe.IncompatibleApp("Frappe is on branch: {} and ERPNext is on branch: {}".format(frappe_branch, erpnext_branch))
|
||||
|
||||
Reference in New Issue
Block a user