diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-09-05 14:11:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 08:11:35 +0200 |
commit | 0b10df67cecd198559a38e42f3659f65aa759af2 (patch) | |
tree | 6996127876092920816a98bc5bcac6ff2b791927 /models/db | |
parent | 1859c5b636637d0a827c4b67ab0f59fe4b635f87 (diff) | |
download | gitea-0b10df67cecd198559a38e42f3659f65aa759af2.tar.gz gitea-0b10df67cecd198559a38e42f3659f65aa759af2.zip |
Improve DeleteByID (#26904)
Diffstat (limited to 'models/db')
-rw-r--r-- | models/db/context.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/db/context.go b/models/db/context.go index 351aea8faf..521857fae8 100644 --- a/models/db/context.go +++ b/models/db/context.go @@ -185,7 +185,7 @@ func DeleteByBean(ctx context.Context, bean any) (int64, error) { // DeleteByID deletes the given bean with the given ID func DeleteByID(ctx context.Context, id int64, bean any) (int64, error) { - return GetEngine(ctx).ID(id).NoAutoTime().Delete(bean) + return GetEngine(ctx).ID(id).NoAutoCondition().NoAutoTime().Delete(bean) } // FindIDs finds the IDs for the given table name satisfying the given condition |