Problem
When a Task has archived: true in its changeset, the TaskList association should be made optional.
- change
order_task in Task.changeset to set_order and from that function:
- add
validate_required([:task_list_id]) here instead of the main changeset
- call
order_task if archived: false
- set the
order to NULL if archived: false
- add tests for the changesets