mirror of
https://github.com/meichthys/church.git
synced 2026-02-09 10:23:42 +00:00
Create install.py
This commit is contained in:
parent
0c5d4795dc
commit
c2c92dbb53
17
church/install.py
Normal file
17
church/install.py
Normal file
@ -0,0 +1,17 @@
|
||||
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."
|
||||
)
|
||||
|
||||
|
||||
def after_install():
|
||||
# Remove non-biblical Genders
|
||||
genders = frappe.db.get_all("Gender")
|
||||
for gender in genders:
|
||||
if gender.name not in ["Male", "Female", "Unknown"]:
|
||||
frappe.delete_doc("Gender", gender.name, force=True)
|
||||
Loading…
x
Reference in New Issue
Block a user