fix: Assignment V2 controller fix (#12415)
This commit is contained in:
committed by
GitHub
parent
052b328a1f
commit
e5b8dc251f
@@ -4,8 +4,8 @@ class Api::V1::Accounts::AgentCapacityPolicies::UsersController < Api::V1::Accou
|
||||
before_action :fetch_user, only: [:destroy]
|
||||
|
||||
def index
|
||||
@users = Current.account.users.joins(:account_users)
|
||||
.where(account_users: { agent_capacity_policy_id: @agent_capacity_policy.id })
|
||||
@users = User.joins(:account_users)
|
||||
.where(account_users: { account_id: Current.account.id, agent_capacity_policy_id: @agent_capacity_policy.id })
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
@@ -27,7 +27,7 @@ class Api::V1::Accounts::AgentCapacityPoliciesController < Api::V1::Accounts::En
|
||||
params.require(:agent_capacity_policy).permit(
|
||||
:name,
|
||||
:description,
|
||||
exclusion_rules: [:overall_capacity, { hours: [], days: [] }]
|
||||
exclusion_rules: [:exclude_older_than_hours, { excluded_labels: [] }]
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user