You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/api/events/event_handlers/create_provider_when_tenant...

10 lines
274 B
Python

from events.tenant_event import tenant_was_updated
from services.provider_service import ProviderService
@tenant_was_updated.connect
def handle(sender, **kwargs):
tenant = sender
if tenant.status == 'normal':
ProviderService.create_system_provider(tenant)