Skip to content

Commit 22cdf7e

Browse files
committed
improvements
1 parent 59e91b9 commit 22cdf7e

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

models/user/user.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,8 +955,8 @@ func UpdateUserCols(ctx context.Context, u *User, cols ...string) error {
955955
return err
956956
}
957957

958-
// UpdateUserColsWithNoAutotime update user according special columns
959-
func UpdateUserColsWithNoAutotime(ctx context.Context, u *User, cols ...string) error {
958+
// UpdateUserColsNoAutotime update user according special columns
959+
func UpdateUserColsNoAutotime(ctx context.Context, u *User, cols ...string) error {
960960
if err := ValidateUser(u, cols...); err != nil {
961961
return err
962962
}

modules/structs/visible_type.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,3 @@ func ExtractKeysFromMapString(in map[string]VisibleType) (keys []string) {
6060
}
6161
return keys
6262
}
63-
64-
func ConvertStringToVisibleType(s string) VisibleType {
65-
if vt, ok := VisibilityModes[s]; ok {
66-
return vt
67-
}
68-
return VisibleType(-1) // Invalid type
69-
}

services/org/org.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func ChangeOrganizationVisibility(ctx context.Context, org *org_model.Organizati
155155
org.Visibility = visibility
156156
// FIXME: If it's a big forks network(forks and sub forks), the database transaction will be too long to fail.
157157
return db.WithTx(ctx, func(ctx context.Context) error {
158-
if err := user_model.UpdateUserColsWithNoAutotime(ctx, org.AsUser(), "visibility"); err != nil {
158+
if err := user_model.UpdateUserColsNoAutotime(ctx, org.AsUser(), "visibility"); err != nil {
159159
return err
160160
}
161161

0 commit comments

Comments
 (0)