Merge branch 'develop' into standalone_develop

This commit is contained in:
yystopf 2022-04-18 10:52:59 +08:00
commit 345fd31834
2 changed files with 5 additions and 1 deletions

View File

@ -83,6 +83,10 @@ class Organization < Owner
after_save :reset_cache_data
def gitea_token
team_users.joins(:team).where(teams: {authorize: "owner"}).take&.user&.gitea_token
end
def reset_cache_data
Cache::V2::OwnerCommonService.new(self.id).reset
end

View File

@ -47,7 +47,7 @@ class Organizations::CreateService < ApplicationService
end
def create_org_and_extension
@organization = Organization.build(params[:name], params[:nickname], user.gitea_token)
@organization = Organization.build(params[:name], params[:nickname])
org_extension = OrganizationExtension.build(organization.id, description, website,
location, repo_admin_change_team_access,
visibility, max_repo_creation)