db connection context fix (#4453)

fixing use of the wrong connection context inside a task
This commit is contained in:
Vitaly Tomilov
2017-12-24 17:56:23 +00:00
committed by GitHub
parent e0a31d2aeb
commit a2b2f18927

View File

@@ -729,7 +729,7 @@ export class PostgresStorageAdapter {
const values = [className, ...valuesArray];
return conn.task(t => {
return this._ensureSchemaCollectionExists(t)
.then(() => conn.none(qs, values))
.then(() => t.none(qs, values))
.catch(error => {
if (error.code === PostgresDuplicateRelationError) {
// Table already exists, must have been created by a different request. Ignore error.