1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 02:09:32 +02:00

Fix stupid bug in addUserForward.

This commit is contained in:
Simo Kinnunen 2014-05-28 22:21:21 +09:00
parent b5659fe321
commit 70f6b323f2

View file

@ -34,9 +34,10 @@ dbapi.loadUser = function(email) {
}
dbapi.addUserForward = function(email, forward) {
var devicePort = forward.devicePort
return db.run(r.table('users').get(email).update({
forwards: r.row('forwards').default([]).filter(function(forward) {
return forward('devicePort').ne(forward.devicePort)
return forward('devicePort').ne(devicePort)
}).append(forward)
}))
}