Skip to content
Snippets Groups Projects

Resolve "[Queue-2.0] CSV Import for TAs"

All threads resolved!
2 files
+ 50
4
Compare changes
  • Side-by-side
  • Inline

Files

@@ -44,12 +44,12 @@ public class UserCsvHelper extends RoleCreateDTO {
public UserCsvHelper(@JsonProperty("netId") String netId, @JsonProperty("role") String role)
throws IllegalArgumentException, InvalidCsvException {
super();
TypeEnum type = TypeEnum.fromValue(role.replace(" ", ""));
TypeEnum type = TypeEnum.fromValue(role.replace(" ", "").replace("\"", ""));
if (type.equals(TypeEnum.ADMIN) || type.equals(TypeEnum.BLOCKED)) {
throw new InvalidCsvException("Admins or blocked people cannot be added this way.");
}
super.type(type);
this.netId = netId;
this.netId = netId.replace(" ", "").replace("\"", "");
}
/**
Loading