فهرست منبع

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