Skip to content

Commit

Permalink
Merge pull request #26 from indiana-university/sort2wow
Browse files Browse the repository at this point in the history
Sort2wow
  • Loading branch information
gjthomas authored Nov 14, 2024
2 parents b896c35 + c973ded commit d71d5c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@

import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -91,8 +90,6 @@ public String main(Model model, CanvasNotifierFormModel canvasNotifierFormModel)
userList.add(pickOptionDummyUser);
userList.addAll(userRepository.findAllAuthorizedSenders());

userList.sort(Comparator.comparing(User::getId));

canvasNotifierFormModel.setUserList(userList);

model.addAttribute("canvasNotifierFormModel", canvasNotifierFormModel);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/edu/iu/uits/lms/canvasnotifier/model/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
@NamedQueries({
@NamedQuery(name = "User.findByUsername", query = "from User where username = :username"),
@NamedQuery(name = "User.findByCanvasUserId", query = "from User where canvas_user_id = :canvasUserId"),
@NamedQuery(name = "User.findAllAuthorizedSenders", query = "from User where authorizedSender = true order by username asc"),
@NamedQuery(name = "User.findAllAuthorizedUsers", query = "from User where authorizedUser = true order by username asc")
@NamedQuery(name = "User.findAllAuthorizedSenders", query = "from User where authorizedSender = true order by display_name asc"),
@NamedQuery(name = "User.findAllAuthorizedUsers", query = "from User where authorizedUser = true order by display_name asc")
})

@SequenceGenerator(name = "CANVASNOTIFIER_USERS_ID_SEQ", sequenceName = "CANVASNOTIFIER_USERS_ID_SEQ", allocationSize = 1)
Expand Down

0 comments on commit d71d5c0

Please sign in to comment.