Fix ride model submission constraint

This commit is contained in:
gpt-engineer-app[bot]
2025-10-10 18:11:05 +00:00
parent 93e908aef7
commit 0aee7673ec

View File

@@ -683,16 +683,18 @@ Deno.serve(async (req) => {
const mfgItemId = createdSubmissionItems.manufacturer.length > 0 ? randomItem(createdSubmissionItems.manufacturer) : undefined; const mfgItemId = createdSubmissionItems.manufacturer.length > 0 ? randomItem(createdSubmissionItems.manufacturer) : undefined;
const category = randomItem(['roller_coaster', 'flat_ride', 'water_ride']); const category = randomItem(['roller_coaster', 'flat_ride', 'water_ride']);
const rideType = randomItem(['spinning', 'launch', 'suspended', 'family', 'standard']);
const modelData: any = { const modelData: any = {
name: `Test Model ${i + 1}`, name: `Test Model ${i + 1}`,
slug: `test-model-${i + 1}`, slug: `test-model-${i + 1}`,
category: category, category: category,
ride_type: rideType,
manufacturer_id: mfgData?.id || null manufacturer_id: mfgData?.id || null
}; };
if (level >= 1) { if (level >= 1) {
modelData.description = `Popular ${category.replace('_', ' ')} model.`; modelData.description = `Popular ${category.replace('_', ' ')} model.`;
modelData.ride_type = randomItem(['spinning', 'launch', 'suspended', 'family']);
} }
if (level >= 2) { if (level >= 2) {