diff --git a/services/libs/data-access-layer/src/collections/index.ts b/services/libs/data-access-layer/src/collections/index.ts index 7921faaa17..be5bc75aa9 100644 --- a/services/libs/data-access-layer/src/collections/index.ts +++ b/services/libs/data-access-layer/src/collections/index.ts @@ -138,13 +138,21 @@ export async function createCollection( qx: QueryExecutor, collection: ICreateCollection, ): Promise { + const data = { + description: null, + slug: null, + logoUrl: null, + imageUrl: null, + color: null, + ...collection, + } return qx.selectOne( ` INSERT INTO collections (name, description, slug, "categoryId", starred, "logoUrl", "imageUrl", color) VALUES ($(name), $(description), $(slug), $(categoryId), $(starred), $(logoUrl), $(imageUrl), $(color)) RETURNING * `, - collection, + data, ) }