mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-04 04:40:37 -06:00
Edit packages/database/migrations/20240229062232_adds_styling_column_to_product_model/data-migration.ts
This commit is contained in:
committed by
GitHub
parent
7a1af85141
commit
30d6161caa
@@ -10,9 +10,9 @@ async function main() {
|
||||
// styling object needs to be created for each product
|
||||
const products = await tx.product.findMany({});
|
||||
|
||||
if (!products) {
|
||||
// something went wrong, could not find any products
|
||||
return;
|
||||
if (!products || products.length === 0) {
|
||||
throw new Error('No products found');
|
||||
}
|
||||
}
|
||||
|
||||
if (products.length) {
|
||||
|
||||
Reference in New Issue
Block a user