Fix active project + main func

This commit is contained in:
2018-07-04 01:06:04 +02:00
parent 115a0246fc
commit 7390e6e031
2 changed files with 12 additions and 6 deletions

View File

@@ -29,7 +29,10 @@ def handle_project(args, last_action):
edit_project(args, args.edit_id)
if not do_something:
list_project(last_action[0])
active_project_id = None
if last_action:
active_project_id = last_action[0]
list_project(active_project_id)
def create_project(args):
# TODO Project is same name is forbidden
@@ -105,4 +108,4 @@ def list_project(active_project_id):
nb_task = 0
current_project = ''
if active_project_id and active_project_id == project_id: current_project = '*'
print('{:1} {:2d}: ({:16}) | {} | {} ({} tasks )'.format(current_project, project_id, username, status, name, nb_task))
print('{:1} {:2d}: ({:8}) | {} | {} ({} tasks )'.format(current_project, project_id, username, status, name, nb_task))