浏览代码

Fixed issue where undefined station gets created.

KrisVos130 8 年之前
父节点
当前提交
233bfb19af
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      backend/logic/actions/stations.js

+ 1 - 1
backend/logic/actions/stations.js

@@ -26,7 +26,7 @@ function initializeAndReturnStation (stationId, cb) {
 		// if the cached version exist
 		(station, next) => {
 			if (station) return next(true, station);
-			db.models.station.find({ id: stationId }, next);
+			db.models.station.findOne({ id: stationId }, next);
 		},
 
 		// if the station exists in the DB, add it to the cache