Skip to content

Commit

Permalink
Bug fix: Root template todo to use slug, required value given in the …
Browse files Browse the repository at this point in the history
…template (#810)

* Show required indicator if a checklist item is required

* Use slug and required value from template for root todo

* Remove indicator

* default slug is None

Co-authored-by: Aditya Bharadwaj <aditya@b12.io>
  • Loading branch information
adbharadwaj and Aditya Bharadwaj committed Oct 1, 2021
1 parent a6f26c3 commit a36ee55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion orchestra/todos/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ def add_todolist_template(todolist_template_slug, project_id,
root_todo = Todo(
project=project,
step=step,
slug=todolist_template.todos.get('slug'),
title=todolist_template.name,
template=todolist_template,
additional_data=additional_data,
status=Todo.Status.PENDING.value
status=Todo.Status.PENDING.value,
required=todolist_template.todos.get('required', False)
)
root_todo.save()

Expand Down

0 comments on commit a36ee55

Please sign in to comment.