aboutsummaryrefslogtreecommitdiffstats
path: root/models/system/notice.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/system/notice.go')
-rw-r--r--models/system/notice.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/system/notice.go b/models/system/notice.go
index b0c0bfb95d..058b78e677 100644
--- a/models/system/notice.go
+++ b/models/system/notice.go
@@ -88,8 +88,8 @@ func RemoveStorageWithNotice(ctx context.Context, bucket storage.ObjectStorage,
}
// CountNotices returns number of notices.
-func CountNotices() int64 {
- count, _ := db.GetEngine(db.DefaultContext).Count(new(Notice))
+func CountNotices(ctx context.Context) int64 {
+ count, _ := db.GetEngine(ctx).Count(new(Notice))
return count
}