mirror of
https://github.com/langgenius/dify.git
synced 2026-06-23 04:11:09 +08:00
fix(agent): decouple roster from app quota (#37625)
This commit is contained in:
parent
c52eafe2ca
commit
933df2f490
@ -26,7 +26,6 @@ from controllers.console.app.app import (
|
||||
)
|
||||
from controllers.console.wraps import (
|
||||
account_initialization_required,
|
||||
cloud_edition_billing_resource_check,
|
||||
edit_permission_required,
|
||||
enterprise_license_required,
|
||||
setup_required,
|
||||
@ -335,7 +334,6 @@ class AgentAppListApi(Resource):
|
||||
@setup_required
|
||||
@login_required
|
||||
@account_initialization_required
|
||||
@cloud_edition_billing_resource_check("apps")
|
||||
@edit_permission_required
|
||||
@with_current_user
|
||||
@with_current_tenant_id
|
||||
@ -414,7 +412,6 @@ class AgentAppCopyApi(Resource):
|
||||
@setup_required
|
||||
@login_required
|
||||
@account_initialization_required
|
||||
@cloud_edition_billing_resource_check("apps")
|
||||
@edit_permission_required
|
||||
@with_current_user
|
||||
@with_current_tenant_id
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from inspect import unwrap
|
||||
from inspect import getsource, unwrap
|
||||
from types import SimpleNamespace
|
||||
from typing import Any, cast
|
||||
|
||||
@ -177,6 +177,11 @@ def test_agent_v2_console_routes_are_agent_id_first() -> None:
|
||||
assert route not in paths
|
||||
|
||||
|
||||
def test_agent_app_write_routes_do_not_reuse_app_billing_quota() -> None:
|
||||
for route_class in (AgentAppListApi, AgentAppCopyApi):
|
||||
assert '@cloud_edition_billing_resource_check("apps")' not in getsource(route_class)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def account_id() -> str:
|
||||
return "account-1"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user