π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
remove aggregation when none
Fendy Heryantoa1a21e859d74
diff --git a/packages/nocodb/src/schema/swagger-v3-validation-patch.json b/packages/nocodb/src/schema/swagger-v3-validation-patch.jsonindex 8a650ac088..39e6ce9f35 100644--- a/packages/nocodb/src/schema/swagger-v3-validation-patch.json+++ b/packages/nocodb/src/schema/swagger-v3-validation-patch.json@@ -47,6 +47,9 @@},"width": {"type": "integer"+ },+ "aggregation": {+ "$ref": "#/components/schemas/ViewAggregationEnum"}},"required": [@@ -89,6 +92,9 @@},"width": {"type": "integer"+ },+ "aggregation": {+ "$ref": "#/components/schemas/ViewAggregationEnum"}},"required": [diff --git a/packages/nocodb/src/schema/swagger-v3.json b/packages/nocodb/src/schema/swagger-v3.jsonindex 9348c4f683..b808178412 100644--- a/packages/nocodb/src/schema/swagger-v3.json+++ b/packages/nocodb/src/schema/swagger-v3.json@@ -5519,6 +5519,9 @@},"width": {"type": "integer"+ },+ "aggregation": {+ "$ref": "#/components/schemas/ViewAggregationEnum"}},"required": [diff --git a/packages/nocodb/src/utils/api-v3-data-transformation.builder.ts b/packages/nocodb/src/utils/api-v3-data-transformation.builder.tsindex 0d04c104a2..456b8dc1e9 100644--- a/packages/nocodb/src/utils/api-v3-data-transformation.builder.ts+++ b/packages/nocodb/src/utils/api-v3-data-transformation.builder.ts@@ -820,6 +820,9 @@ export const viewColumnBuilder = builderGenerator<const numberWidth = Number(numberStrWidth);formattedData.width = !isNaN(numberWidth) ? numberWidth : numberStrWidth;}+ if (formattedData.aggregation === 'none') {+ delete formattedData.aggregation;+ }return formattedData;},});