mirror of
https://github.com/meichthys/church.git
synced 2026-01-26 12:00:10 +00:00
refactor install.py after_install scripts
This commit is contained in:
parent
cd37ee9f57
commit
a109a0a912
@ -4,13 +4,15 @@ import frappe
|
||||
def before_install():
|
||||
# Ensure ERPNext is installed
|
||||
if "erpnext" not in frappe.get_installed_apps():
|
||||
raise FileNotFoundError(
|
||||
f"ERPNext must be installed before installing this app."
|
||||
)
|
||||
raise FileNotFoundError("ERPNext must be installed before installing this app.")
|
||||
|
||||
|
||||
def after_install():
|
||||
# Remove non-biblical Genders
|
||||
adjust_gender_options()
|
||||
|
||||
|
||||
def adjust_gender_options():
|
||||
"""Remove non-biblical Genders from default gender list"""
|
||||
genders = frappe.db.get_all("Gender")
|
||||
for gender in genders:
|
||||
if gender.name not in ["Male", "Female", "Unknown"]:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user