aboutsummaryrefslogtreecommitdiffstats
path: root/services/packages/packages.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-11-14 23:03:56 +0800
committerGitHub <noreply@github.com>2023-11-14 16:03:56 +0100
commitf65977df3a65e193995c0bdf7069553fd5867fe2 (patch)
tree932d2828ced943e7e85a5de1ddb03a0e0958e52b /services/packages/packages.go
parent5ab3782f111dfc10378fce403ea5934c4585c2a9 (diff)
downloadgitea-f65977df3a65e193995c0bdf7069553fd5867fe2.tar.gz
gitea-f65977df3a65e193995c0bdf7069553fd5867fe2.zip
Revert "packages: Calculate package size quota using package creator ID instead of owner ID (#28007)" (#28049)
This reverts commit #28007 60522fc96f1fa4675e95010e4b1535e0eac21910.
Diffstat (limited to 'services/packages/packages.go')
-rw-r--r--services/packages/packages.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/packages/packages.go b/services/packages/packages.go
index 294ee6cc1a..56d5cc04de 100644
--- a/services/packages/packages.go
+++ b/services/packages/packages.go
@@ -401,7 +401,9 @@ func CheckSizeQuotaExceeded(ctx context.Context, doer, owner *user_model.User, p
}
if setting.Packages.LimitTotalOwnerSize > -1 {
- totalSize, err := packages_model.CalculateCreatorPackageQuota(ctx, doer.ID)
+ totalSize, err := packages_model.CalculateFileSize(ctx, &packages_model.PackageFileSearchOptions{
+ OwnerID: owner.ID,
+ })
if err != nil {
log.Error("CalculateFileSize failed: %v", err)
return err