Fix: handle no students in class in deposit
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -20,7 +20,7 @@ defmodule ConfientWeb.DepositController do
|
|||||||
{:ok, class} ->
|
{:ok, class} ->
|
||||||
next_assignments = Confient.Works.get_next_assignments(class)
|
next_assignments = Confient.Works.get_next_assignments(class)
|
||||||
|
|
||||||
if length(next_assignments) > 0 && length(class.students) do
|
if length(next_assignments) > 0 && length(class.students) > 0 do
|
||||||
changeset = Confient.Student.Work.changeset(%Confient.Student.Work{}, %{})
|
changeset = Confient.Student.Work.changeset(%Confient.Student.Work{}, %{})
|
||||||
|
|
||||||
student =
|
student =
|
||||||
|
|||||||
Reference in New Issue
Block a user