Browse Source

Fix task Area selction after removing one

tr4ck3ur 2 years ago
parent
commit
46c626c96f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      jm2l/views.py

+ 1 - 1
jm2l/views.py

@@ -430,7 +430,7 @@ def tasks(request):
430 430
             DBSession.add(Task)
431 431
         DBSession.flush()
432 432
         return HTTPFound(location=request.route_url('list_task')+"#"+slugify(Task.area.name))
433
-    return {'form':form, 'area':slugify(Areas[Task.area_uid-1].name)}
433
+    return {'form':form, 'area':slugify(Task.area.name)}
434 434
 
435 435
 @view_config(route_name='handle_pole', renderer='jm2l:templates/Staff/pole.mako')
436 436
 def tasks_area(request):