diff --git a/SchoolPower/Models/Subject.cs b/SchoolPower/Models/Subject.cs index 41a78b9..faada78 100644 --- a/SchoolPower/Models/Subject.cs +++ b/SchoolPower/Models/Subject.cs @@ -100,7 +100,10 @@ public Subject(JObject data) { SmallTextFontWeight = FontWeights.Normal; IsActive = GetActivity(StartDate, EndDate); - JArray assignmentsJarray = (JArray)data["assignments"]; + JArray assignmentsJarray = new JArray(); + try { + assignmentsJarray = (JArray)data["assignments"]; + } catch (Exception) { } try { for (int index = 0; index < assignmentsJarray.Count; index++) Assignments.Add(new AssignmentItem((JObject)assignmentsJarray[index]));