mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
button select uses name for uniqueness
This commit is contained in:
@@ -112,14 +112,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
private void setAssignmentGroup(LocalAssignmentGroup group)
|
||||
private void setAssignmentGroup(LocalAssignmentGroup? group)
|
||||
{
|
||||
if(assignmentContext.Assignment == null)
|
||||
return;
|
||||
|
||||
var newAssignment = assignmentContext.Assignment with
|
||||
{
|
||||
LocalAssignmentGroupId = group.Id
|
||||
LocalAssignmentGroupId = group?.Id
|
||||
};
|
||||
|
||||
assignmentContext.SaveAssignment(newAssignment);
|
||||
@@ -150,8 +150,7 @@
|
||||
<ButtonSelect
|
||||
Label="Assignment Group"
|
||||
Options="planner.LocalCourse?.Settings.AssignmentGroups"
|
||||
GetId="(g) => g.Id"
|
||||
GetName="(g) => g.Name"
|
||||
GetName="(g) => g?.Name"
|
||||
OnSelect="(g) => setAssignmentGroup(g)"
|
||||
SelectedOption="selectedAssignmentGroup"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user