1
0

chore: cleanup

This commit is contained in:
kolaente
2023-02-02 11:58:57 +01:00
parent 7cab3a77a9
commit 7a9611c2da
9 changed files with 16 additions and 16 deletions

View File

@ -1210,7 +1210,7 @@ func (t *Task) Update(s *xorm.Session, a web.Auth) (err error) {
// Update all positions if the newly saved position is < 0.1
if ot.Position < 0.1 {
err = recalculateTaskPositions(s, t.ListID)
err = recalculateTaskPositions(s, t.ProjectID)
if err != nil {
return err
}
@ -1273,11 +1273,11 @@ func recalculateTaskKanbanPositions(s *xorm.Session, bucketID int64) (err error)
return
}
func recalculateTaskPositions(s *xorm.Session, listID int64) (err error) {
func recalculateTaskPositions(s *xorm.Session, projectID int64) (err error) {
allTasks := []*Task{}
err = s.
Where("list_id = ?", listID).
Where("project_id = ?", projectID).
OrderBy("position asc").
Find(&allTasks)
if err != nil {