Fix jwt-token

This commit is contained in:
2025-09-15 12:58:12 +02:00
parent e609cc4541
commit 4f1ccba418
2 changed files with 23 additions and 15 deletions

View File

@@ -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);
}