From b4cf2297a3c4d2497153ecdb2afd16218aeec99f Mon Sep 17 00:00:00 2001 From: Tamas Kozmer <72397075+tamaskozmer@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:36:08 +0200 Subject: [PATCH] [MBL-17526][Teacher] EditAssignmentDetails crash #2428 refs: MBL-17526 affects: Teacher release note: none --- .../fragments/EditAssignmentDetailsFragment.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/teacher/src/main/java/com/instructure/teacher/fragments/EditAssignmentDetailsFragment.kt b/apps/teacher/src/main/java/com/instructure/teacher/fragments/EditAssignmentDetailsFragment.kt index 89e9c31a94..0ffade26c5 100644 --- a/apps/teacher/src/main/java/com/instructure/teacher/fragments/EditAssignmentDetailsFragment.kt +++ b/apps/teacher/src/main/java/com/instructure/teacher/fragments/EditAssignmentDetailsFragment.kt @@ -362,8 +362,18 @@ class EditAssignmentDetailsFragment : BaseFragment() { if (dueDateGroup.isEveryone) { assignees += getString(if (editDateGroups.any { it.hasOverrideAssignees }) R.string.everyone_else else R.string.everyone) } - dueDateGroup.groupIds.forEach { assignees.add(groupsMapped[it]?.name!!) } - dueDateGroup.sectionIds.forEach { assignees.add(sectionsMapped[it]?.name!!) } + dueDateGroup.groupIds.forEach { + val group = groupsMapped[it] + if (group?.name != null) { + assignees.add(group.name!!) + } + } + dueDateGroup.sectionIds.forEach { + val section = sectionsMapped[it] + if (section != null) { + assignees.add(section.name) + } + } dueDateGroup.studentIds.forEach { val student = studentsMapped[it] if (student != null) {