mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 02:10:12 -06:00
fix: final bugs in release 2.5 (#3084)
This commit is contained in:
@@ -94,7 +94,7 @@ docker pull ghcr.io/formbricks/data-migrations:latest && \
|
||||
docker run --rm \
|
||||
--network=formbricks_default \
|
||||
-e DATABASE_URL="postgresql://postgres:postgres@postgres:5432/formbricks?schema=public" \
|
||||
-e UPGRADE_TO_VERSION="v2.4" \
|
||||
-e UPGRADE_TO_VERSION="v2.5" \
|
||||
ghcr.io/formbricks/data-migrations:latest
|
||||
```
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/restrict-template-expressions -- using template strings for logging */
|
||||
|
||||
/* eslint-disable no-console -- logging is allowed in migration scripts */
|
||||
import { PrismaClient } from "@prisma/client";
|
||||
import { type TSurveyQuestion, TSurveyQuestionTypeEnum } from "@formbricks/types/surveys/types";
|
||||
@@ -69,6 +71,8 @@ async function runMigration(): Promise<void> {
|
||||
|
||||
await Promise.all(migrationPromises);
|
||||
|
||||
console.log(`Updated ${migrationPromises.length} questions in ${relevantSurveys.length} surveys`);
|
||||
|
||||
const endTime = Date.now();
|
||||
console.log(`Data migration completed. Total time: ${((endTime - startTime) / 1000).toString()}s`);
|
||||
},
|
||||
|
||||
@@ -35,6 +35,14 @@ export const RenderResponse: React.FC<RenderResponseProps> = ({
|
||||
language,
|
||||
isExpanded = true,
|
||||
}) => {
|
||||
if (
|
||||
(typeof responseData === "string" && responseData === "") ||
|
||||
(Array.isArray(responseData) && responseData.length === 0) ||
|
||||
(typeof responseData === "object" && Object.keys(responseData).length === 0)
|
||||
) {
|
||||
return <p className="ph-no-capture my-1 font-normal text-slate-700">-</p>;
|
||||
}
|
||||
|
||||
const handleArray = (data: string | number | string[]): string => {
|
||||
if (Array.isArray(data)) {
|
||||
return data.join(", ");
|
||||
|
||||
Reference in New Issue
Block a user