mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-01 11:06:06 +01:00
(refs #441)Fix delete condition
This commit is contained in:
@@ -9,7 +9,7 @@ trait ActivityService {
|
|||||||
|
|
||||||
def deleteOldActivities(limit: Int)(implicit s: Session): Int = {
|
def deleteOldActivities(limit: Int)(implicit s: Session): Int = {
|
||||||
Activities.map(_.activityId).sortBy(_ desc).drop(limit).firstOption.map { id =>
|
Activities.map(_.activityId).sortBy(_ desc).drop(limit).firstOption.map { id =>
|
||||||
Activities.filter(_.activityId < id.bind).delete
|
Activities.filter(_.activityId <= id.bind).delete
|
||||||
} getOrElse 0
|
} getOrElse 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user