fixed add task creation

This commit is contained in:
Анатолий Богомолов 2024-03-10 00:29:44 +10:00
parent 28dad77a80
commit 1ce84db59c
2 changed files with 5 additions and 3 deletions

View File

@ -28,8 +28,10 @@ def create_task(session_id: int):
types = list(filter(lambda item: item in ('parse', 'add', 'message'), info.keys())) types = list(filter(lambda item: item in ('parse', 'add', 'message'), info.keys()))
if len(types) > 0: if len(types) <= 0:
type = types[0] return "", 204
type = types[0]
task = Task( task = Task(
name = info.get('task_name') or str(uuid.uuid4()), name = info.get('task_name') or str(uuid.uuid4()),

View File

@ -38,7 +38,7 @@
<section class="tab-pane fade" id="actions-add-section"> <section class="tab-pane fade" id="actions-add-section">
<div class="form-floating"> <div class="form-floating">
<input type="text" name="url" name="add" class="form-control" id="group-to-input" <input type="text" name="add" class="form-control" id="group-to-input"
placeholder="Группа для добавлнеия"> placeholder="Группа для добавлнеия">
<label for="group-to-input">Группа для добавления</label> <label for="group-to-input">Группа для добавления</label>
</div> </div>