mirror of
https://github.com/langgenius/dify.git
synced 2026-01-08 07:14:14 +00:00
more typed orm (#28331)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -181,19 +181,21 @@ class TriggerProviderService:
|
||||
|
||||
# Create provider record
|
||||
subscription = TriggerSubscription(
|
||||
id=subscription_id or str(uuid.uuid4()),
|
||||
tenant_id=tenant_id,
|
||||
user_id=user_id,
|
||||
name=name,
|
||||
endpoint_id=endpoint_id,
|
||||
provider_id=str(provider_id),
|
||||
parameters=parameters,
|
||||
properties=properties_encrypter.encrypt(dict(properties)),
|
||||
credentials=credential_encrypter.encrypt(dict(credentials)) if credential_encrypter else {},
|
||||
parameters=dict(parameters),
|
||||
properties=dict(properties_encrypter.encrypt(dict(properties))),
|
||||
credentials=dict(credential_encrypter.encrypt(dict(credentials)))
|
||||
if credential_encrypter
|
||||
else {},
|
||||
credential_type=credential_type.value,
|
||||
credential_expires_at=credential_expires_at,
|
||||
expires_at=expires_at,
|
||||
)
|
||||
subscription.id = subscription_id or str(uuid.uuid4())
|
||||
|
||||
session.add(subscription)
|
||||
session.commit()
|
||||
|
||||
Reference in New Issue
Block a user