diff --git a/src/mothership-app/pb_hooks/src/instances-delete.pb.js b/src/mothership-app/pb_hooks/src/instances-delete.pb.js index ee0201d5..24d152a8 100644 --- a/src/mothership-app/pb_hooks/src/instances-delete.pb.js +++ b/src/mothership-app/pb_hooks/src/instances-delete.pb.js @@ -49,7 +49,7 @@ routerAdd( throw new BadRequestError(`Not authorized`) } - if (record.get('status') !== 'idle') { + if (record.getString('status').toLowerCase() !== 'idle') { throw new BadRequestError(`Instance must be shut down first.`) } diff --git a/src/mothership-app/pb_hooks/src/signup.pb.js b/src/mothership-app/pb_hooks/src/signup.pb.js index af6a35f5..7d84ee40 100644 --- a/src/mothership-app/pb_hooks/src/signup.pb.js +++ b/src/mothership-app/pb_hooks/src/signup.pb.js @@ -169,7 +169,7 @@ routerAdd( const instance = new Record(instanceCollection) instance.set('subdomain', desiredInstanceName) instance.set('uid', user.get('id')) - instance.set('status', 'Idle') + instance.set('status', 'idle') instance.set('version', '0.19.*') txDao.saveRecord(instance) } catch (e) {