Skip to content

Commit

Permalink
Fix service following Knex update
Browse files Browse the repository at this point in the history
A recent change and test appear to be failing the build after this update to Knex. Checking the Knex changelog we found this

- [Bug fix: PostgreSQL: Fix Malformed array literal 2.4.0 Regression #5439](https://github.com/knex/knex/blob/master/CHANGELOG.md#241---18-january-2022)

'Array' you say!? [The PR](knex/knex#5439) links to various issues which all seem to have JSONB and arrays as primary concerns.

TBH, we don't have the time to properly dig into why it worked before but now doesn't. But as this was a fix to a regression the behaviour is unlikely to change in Knex so we need to code for it.

This change resolves the issue for us. Looking in the DB the column is back to holding an empty array (without the fix Knex's change made it an empty JSON object) which matches what the legacy system is doing.
  • Loading branch information
Cruikshanks committed Jan 19, 2023
1 parent 2223251 commit 0c2d776
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -29,7 +29,7 @@ async function go (billingBatch, issuer) {
subtype: billingBatch.batchType,
issuer,
metadata: _metadata(billingBatch),
licences: [],
licences: JSON.stringify([]),
status: 'start',
createdAt: timestamp,
updatedAt: timestamp
Expand Down

0 comments on commit 0c2d776

Please sign in to comment.