소스 검색

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