Fix silent crasher when reordering table rows

This commit is contained in:
Scot Hacker 2018-04-07 23:31:24 -07:00
parent d169f131a2
commit 4fe3829b98
2 changed files with 7 additions and 7 deletions

View file

@ -260,10 +260,10 @@ def reorder_tasks(request) -> HttpResponse:
# Re-prioritize each task in list
i = 1
for t in newtasklist:
newtask = Task.objects.get(pk=t)
newtask.priority = i
newtask.save()
for id in newtasklist:
task = Task.objects.get(pk=id)
task.priority = i
task.save()
i += 1
# All views must return an httpresponse of some kind ... without this we get