Create task
This commit is contained in:
@@ -30,20 +30,21 @@ def handle_project(args, last_action, conn):
|
||||
|
||||
if args[0] == '-c':
|
||||
if len(args) == 1:
|
||||
print('required project name')
|
||||
print('missing project name')
|
||||
sys.exit(1)
|
||||
|
||||
project = Project()
|
||||
project.name = arg_string(args[1], 'project name')
|
||||
create_project(project, conn)
|
||||
elif args[0] == '-e':
|
||||
print('Update project')
|
||||
print('TODO Update project')
|
||||
elif args[0] == '-d':
|
||||
if len(args) > 1:
|
||||
delete_project(arg_number(args[1]), conn)
|
||||
else:
|
||||
delete_project(last_action.project_id, conn)
|
||||
|
||||
# TODO Move this function
|
||||
def arg_string(arg, required = ''):
|
||||
if required and arg.startswith('-'):
|
||||
print('required ', required)
|
||||
|
||||
Reference in New Issue
Block a user