open-dash / open-dash-diy

Node.js Open-Dash DIY Solution for internal use only, no external hosting.
GNU Affero General Public License v3.0
16 stars 8 forks source link

Error when trying to edit a dashboard #19

Closed stevejm8883 closed 7 years ago

stevejm8883 commented 7 years ago

I have just install this on my Raspberry Pi and was able to authenticate with smart things and import my devices. I then created a new dashboard and when I click on edit I get the following error message:

TypeError: Cannot read property 'forEach' of undefined at app.get (/media/opendash/open-dash-diy/app/controllers/dashboards.js:56:29) at Layer.handle [as handle_request] (/media/opendash/open-dash-diy/node_modules/express/lib/router/layer.js:95:5) at next (/media/opendash/open-dash-diy/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/media/opendash/open-dash-diy/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/media/opendash/open-dash-diy/node_modules/express/lib/router/layer.js:95:5) at /media/opendash/open-dash-diy/node_modules/express/lib/router/index.js:281:22 at param (/media/opendash/open-dash-diy/node_modules/express/lib/router/index.js:354:14) at param (/media/opendash/open-dash-diy/node_modules/express/lib/router/index.js:365:14) at Function.process_params (/media/opendash/open-dash-diy/node_modules/express/lib/router/index.js:410:3) at next (/media/opendash/open-dash-diy/node_modules/express/lib/router/index.js:275:10) at expressInit (/media/opendash/open-dash-diy/node_modules/express/lib/middleware/init.js:40:5) at Layer.handle [as handle_request] (/media/opendash/open-dash-diy/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/media/opendash/open-dash-diy/node_modules/express/lib/router/index.js:317:13) at /media/opendash/open-dash-diy/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/media/opendash/open-dash-diy/node_modules/express/lib/router/index.js:335:12) at next (/media/opendash/open-dash-diy/node_modules/express/lib/router/index.js:275:10)

any ideas? -Stephan

pstuart commented 7 years ago

Yes. Thanks for reporting. I will push a fix shortly for this.

pstuart commented 7 years ago

Just pushed the fix, bigger changes than this, duplicate devices are now allowed. You will also want to go into your ST area and sync routines again.