Fix jwt-token
This commit is contained in:
@@ -294,7 +294,14 @@ async function createTestTenant(tenantData = {}) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return await Tenant.create(defaultTenantData);
|
console.log('🔍 Creating tenant with data:', JSON.stringify(defaultTenantData, null, 2));
|
||||||
|
console.log('🔍 Data types:', Object.keys(defaultTenantData).map(key => `${key}: ${typeof defaultTenantData[key]}`));
|
||||||
|
|
||||||
|
// Try manual UUID generation as a workaround
|
||||||
|
const { v4: uuidv4 } = require('uuid');
|
||||||
|
const tenantWithId = { ...defaultTenantData, id: uuidv4() };
|
||||||
|
|
||||||
|
return await Tenant.create(tenantWithId);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('❌ Tenant creation failed:', error.message);
|
console.error('❌ Tenant creation failed:', error.message);
|
||||||
console.error('❌ Validation errors:', error.errors);
|
console.error('❌ Validation errors:', error.errors);
|
||||||
|
|||||||
Reference in New Issue
Block a user