Skip to content

Commit

Permalink
[Bugfix:RainbowGrades] fix issue with numeric id null value (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamTuhacek authored Feb 28, 2023
1 parent a3165a8 commit 912b20e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,13 @@ void load_student_grades(std::vector<Student*> &students) {
s->setPreferredLastName(j[token].get<std::string>());
}
} else if (token == "user_numeric_id") {
s->setNumericID(j[token].get<std::string>());

This comment has been minimized.

Copy link
@MohnishRawat

MohnishRawat Mar 5, 2023

s.setNumericID(j[token].getstd::string());


if (j[token].is_string()) {
s->setNumericID(j[token].get<std::string>());
}
else {
s->setNumericID("");
}
} else if (token == "last_update") {
s->setLastUpdate(j[token].get<std::string>());
} else if (token == "registration_section") {
Expand Down

0 comments on commit 912b20e

Please sign in to comment.