fix: create team overflow tip
This commit is contained in:
parent
25d0e784bb
commit
70d22f7c4f
|
@ -44,7 +44,7 @@ class Organizations::TeamsController < Organizations::BaseController
|
|||
def create
|
||||
ActiveRecord::Base.transaction do
|
||||
if @organization.teams.count >= 50
|
||||
return render_forbidden("组织的团队数量已超过限制!")
|
||||
return tip_exception("组织的团队数量已超过限制!")
|
||||
else
|
||||
Organizations::CreateTeamForm.new(team_params).validate!
|
||||
@team = Organizations::Teams::CreateService.call(current_user, @organization, team_params)
|
||||
|
|
Loading…
Reference in New Issue