Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed May 21, 2018
1 parent 5dd531a commit 3222f88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/snapshot/tasks/export/snapshot.csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = ( state, callback ) => {

const csv = callback => {
db.Snapshot
.findAll({ order: [ ['id', 'ASC'] ] })
.findAll({ order: [ ['id', 'ASC'] ] }, {type: db.sequelize.QueryTypes.SELECT})
.then( results => {
let _results = results.map( result => {
return {user: result.dataValues.user, account_name: result.dataValues.account_name, key: result.dataValues.key, balance: result.dataValues.balance}
Expand All @@ -18,7 +18,7 @@ module.exports = ( state, callback ) => {
if(config.overwrite_snapshot) fs.createReadStream(state.files.path_snapshot_csv).pipe(fs.createWriteStream(state.files.file_snapshot_csv))
callback(null, state)
})
.catch( error => { throw new Error(error) })
// .catch( error => { throw new Error(error) } )
})
.catch( error => { throw new Error(error) })
}
Expand Down

0 comments on commit 3222f88

Please sign in to comment.