1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 10:26:17 +00:00

add org_created_callback (#7746)

This commit is contained in:
lian
2025-04-19 14:32:51 +08:00
committed by GitHub
parent de09b014a0
commit cb05c2390e

View File

@@ -0,0 +1,16 @@
import os
import sys
import logging
from seahub.organizations.signals import org_created
logger = logging.getLogger(__name__)
try:
conf_dir = os.environ['SEAFILE_CENTRAL_CONF_DIR']
sys.path.append(conf_dir)
try:
from seahub_custom_functions import org_created_callback
org_created.connect(org_created_callback)
except ImportError as e:
logger.debug(e)
except KeyError as e:
logger.debug(e)