Realized why scoring chains were ending early.
This commit is contained in:
parent
b7ae1f7e25
commit
218c542a5a
1 changed files with 2 additions and 2 deletions
|
@ -241,11 +241,11 @@ findNearestBetterSessionID = (levelOriginalID, levelMajorVersion, sessionID, ses
|
||||||
|
|
||||||
retrieveAllOpponentSessionIDs = (sessionID, cb) ->
|
retrieveAllOpponentSessionIDs = (sessionID, cb) ->
|
||||||
query = LevelSession.findOne({"_id":sessionID})
|
query = LevelSession.findOne({"_id":sessionID})
|
||||||
.select('matches.opponents.sessionID')
|
.select('matches.opponents.sessionID.submitDate')
|
||||||
.lean()
|
.lean()
|
||||||
query.exec (err, session) ->
|
query.exec (err, session) ->
|
||||||
if err? then return cb err, null
|
if err? then return cb err, null
|
||||||
opponentSessionIDs = (match.opponents[0].sessionID for match in session.matches)
|
opponentSessionIDs = (match.opponents[0].sessionID for match in session.matches when match.date > session.submitDate)
|
||||||
cb err, opponentSessionIDs
|
cb err, opponentSessionIDs
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue