mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-21 02:01:35 +00:00
Merge pull request #1584 from balena-io/1581-patch-commit-constraint
Prevent inserting null commit during DB migration
This commit is contained in:
commit
001f544c31
@ -9,7 +9,7 @@ export async function up(knex) {
|
||||
const currentCommit = await knex('config')
|
||||
.where({ key: 'currentCommit' })
|
||||
.select('value');
|
||||
if (currentCommit[0] != null) {
|
||||
if (currentCommit[0] != null && currentCommit[0].value != null) {
|
||||
const apps = await knex('app').select(['appId']);
|
||||
|
||||
for (const app of apps) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user