Skip to content
Snippets Groups Projects

Draft: Resolve "Allow adding students/staff using email/student number/name"

9 files
+ 115
33
Compare changes
  • Side-by-side
  • Inline

Files

@@ -464,14 +464,14 @@ public class EditionController {
}
try {
PersonDetailsDTO person = pApi.getPersonByUsername(dto.getUsername()).block();
PersonDetailsDTO person = pApi.getPersonByIdentifier(dto.getUserIdentifier()).block();
return checkDemoteThenAddSingle(person, edition, redirectAttributes, create, model);
} catch (WebClientResponseException e) {
redirectAttributes.addFlashAttribute("error",
String.format("Person with username: %s cannot be found. " +
"Make sure this person has logged into our system before",
dto.getUsername()));
String.format("Person with the user identifier: %s cannot be found. " +
"Make sure this person has logged in our system before.",
dto.getUserIdentifier()));
return "redirect:/edition/" + editionId + "/participants/create";
}
}
Loading