Skip to content

Commit

Permalink
bug in 'date de sortie' when multiple academic affiliations corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgirard committed Mar 6, 2017
1 parent b3ef7e9 commit 7184006
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specs/columns.virtual.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exports.entryDate = (people, scope) => {
exports.leavingDate = (people, scope) => {
if (people.academicMemberships)
if (scope.userScopeOrganizationId)
return _.max(people.academicMemberships.filter(e => e.organization._id.toString() === scope.userScopeOrganizationId).map(e => e.endDate))
return _.maxBy(people.academicMemberships.filter(e => e.organization._id.toString() === scope.userScopeOrganizationId).map(e => e.endDate), d => d || Infinity )
else
// central point of view let's check if the correct role is set
if (scope.userCentralRole)
Expand Down

0 comments on commit 7184006

Please sign in to comment.