lightning-viz / lightning

Data Visualization Server

Home Page:http://lightning-viz.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deleting visualization throwing error

freeman-lab opened this issue · comments

At least when running a local lightning server, deleting a visualization causes the server to crash, with the following error in the log:

/Users/freemanj11/github/lightning/node_modules/sqlite3/lib/trace.js:28
                    throw err;
                          ^
ReferenceError: config is not defined
    at null.<anonymous> (/Users/freemanj11/github/lightning/app/controllers/visualizationTypes.js:135:37)
    at EventEmitter.emit (events.js:95:17)
    at module.exports.CustomEventEmitter.emit (/Users/freemanj11/github/lightning/node_modules/sequelize/lib/emitters/custom-event-emitter.js:61:33)
    at null.<anonymous> (/Users/freemanj11/github/lightning/node_modules/sequelize/lib/dao.js:542:21)
    at Hooks.runHooks (/Users/freemanj11/github/lightning/node_modules/sequelize/lib/hooks.js:41:15)
    at null.<anonymous> (/Users/freemanj11/github/lightning/node_modules/sequelize/lib/dao.js:537:27)
    at EventEmitter.emit (events.js:95:17)
    at module.exports.CustomEventEmitter.emit (/Users/freemanj11/github/lightning/node_modules/sequelize/lib/emitters/custom-event-emitter.js:61:33)
    at chainer.runSerially.success.error.emitter.query.sql (/Users/freemanj11/github/lightning/node_modules/sequelize/lib/query-interface.js:662:19)
    at EventEmitter.emit (events.js:98:17)
--> in Database#all('DELETE FROM `VisualizationTypes` WHERE `id`=143', [Function])
    at executeSql (/Users/freemanj11/github/lightning/node_modules/sequelize/lib/dialects/sqlite/query.js:43:54)
    at /Users/freemanj11/github/lightning/node_modules/sequelize/node_modules/lodash/dist/lodash.js:5144:23
    at Statement.<anonymous> (/Users/freemanj11/github/lightning/node_modules/sequelize/lib/dialects/sqlite/query.js:80:17)
1 Jun 21:53:39 - [nodemon] app crashed - waiting for file changes before starting...

If I restart the server, the deleted visualization is in fact gone.

Update: this error occurs both for deleting a visualization type from the viz type browser, as well as deleting an individual visualization from the viz notebook view