Commit 655ff5ca authored by Ben Anderson's avatar Ben Anderson

Fixed issue with employees put route, all routes have been confirmed to work as expected

parent 4bd0d682
......@@ -34,11 +34,11 @@ public class EmployeeService {
return null;
}
if (!updatedEmployee.getFirstName().equals(staleEmployee.getFirstName())) {
if (updatedEmployee.getFirstName() != null && !updatedEmployee.getFirstName().equals(staleEmployee.getFirstName())) {
staleEmployee.setFirstName(updatedEmployee.getFirstName());
}
if (!updatedEmployee.getLastName().equals(staleEmployee.getFirstName())) {
if (updatedEmployee.getLastName() != null &&!updatedEmployee.getLastName().equals(staleEmployee.getFirstName())) {
staleEmployee.setLastName(updatedEmployee.getLastName());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment