mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 12:37:20 +08:00
fix trial get
This commit is contained in:
parent
3e082e6976
commit
905a5b348d
@ -7,7 +7,7 @@ from werkzeug.exceptions import Forbidden, InternalServerError, NotFound
|
|||||||
|
|
||||||
import services
|
import services
|
||||||
from controllers.common import fields
|
from controllers.common import fields
|
||||||
from controllers.common.fields import build_site_model
|
from controllers.common.fields import Site as SiteResponse
|
||||||
from controllers.console import api
|
from controllers.console import api
|
||||||
from controllers.console.app.error import (
|
from controllers.console.app.error import (
|
||||||
AppUnavailableError,
|
AppUnavailableError,
|
||||||
@ -387,7 +387,6 @@ class TrialSitApi(Resource):
|
|||||||
|
|
||||||
@trial_feature_enable
|
@trial_feature_enable
|
||||||
@get_app_model_with_trial
|
@get_app_model_with_trial
|
||||||
@service_api_ns.marshal_with(build_site_model(service_api_ns))
|
|
||||||
def get(self, app_model):
|
def get(self, app_model):
|
||||||
"""Retrieve app site info.
|
"""Retrieve app site info.
|
||||||
|
|
||||||
@ -402,7 +401,7 @@ class TrialSitApi(Resource):
|
|||||||
if app_model.tenant.status == TenantStatus.ARCHIVE:
|
if app_model.tenant.status == TenantStatus.ARCHIVE:
|
||||||
raise Forbidden()
|
raise Forbidden()
|
||||||
|
|
||||||
return site
|
return SiteResponse.model_validate(site).model_dump(mode="json")
|
||||||
|
|
||||||
|
|
||||||
class TrialAppParameterApi(Resource):
|
class TrialAppParameterApi(Resource):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user