Fix jwt-token
This commit is contained in:
@@ -134,7 +134,7 @@ async function createTestUser(userData = {}) {
|
||||
|
||||
// Create or find tenant
|
||||
let tenant;
|
||||
if (userData.tenant_id) {
|
||||
if (userData.tenant_id && typeof userData.tenant_id === 'string' && userData.tenant_id !== 'UUIDV4') {
|
||||
tenant = await Tenant.findByPk(userData.tenant_id);
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ async function createTestDevice(deviceData = {}) {
|
||||
|
||||
// Create or find tenant
|
||||
let tenant;
|
||||
if (deviceData.tenant_id) {
|
||||
if (deviceData.tenant_id && typeof deviceData.tenant_id === 'string' && deviceData.tenant_id !== 'UUIDV4') {
|
||||
tenant = await Tenant.findByPk(deviceData.tenant_id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user