Current value on delete + no create without parent
This commit is contained in:
5
note.py
5
note.py
@@ -61,9 +61,12 @@ def handle_note(args, last_action, conn):
|
||||
|
||||
|
||||
def create_note(note, active_project_id, active_task_id, conn):
|
||||
# TODO Don't create note if no project (nothing selected?) ==> foreign key is not a solution: there is no project ID :)
|
||||
logging.info(">> Create note")
|
||||
|
||||
if active_task_id == 0:
|
||||
print("No task selected")
|
||||
sys.exit(1)
|
||||
|
||||
query = """
|
||||
INSERT INTO note (project_id, task_id, username, message)
|
||||
VALUES (?, ?, ?, ?);
|
||||
|
||||
Reference in New Issue
Block a user