fix(db-postgres): validateExistingBlockIsIdentical localized (#5840)

This commit is contained in:
Ritsu
2024-04-15 23:50:28 +03:00
committed by GitHub
parent f21b394d21
commit f1b2f767bb
4 changed files with 53 additions and 5 deletions

View File

@@ -5,6 +5,7 @@ import { devUser } from '../credentials.js'
import { ArrayCollection } from './collections/Array/index.js'
import { NestedToArrayAndBlock } from './collections/NestedToArrayAndBlock/index.js'
import {
blocksWithLocalizedSameName,
defaultLocale,
englishTitle,
localizedPostsSlug,
@@ -231,6 +232,37 @@ export default buildConfigWithDefaults({
},
],
},
{
slug: blocksWithLocalizedSameName,
fields: [
{
type: 'blocks',
name: 'blocks',
blocks: [
{
slug: 'block_first',
fields: [
{
name: 'title',
type: 'text',
localized: true,
},
],
},
{
slug: 'block_second',
fields: [
{
name: 'title',
type: 'text',
localized: true,
},
],
},
],
},
],
},
],
globals: [
{

View File

@@ -16,3 +16,4 @@ export const relationshipLocalizedSlug = 'relationship-localized'
export const withRequiredLocalizedFields = 'localized-required'
export const localizedSortSlug = 'localized-sort'
export const usersSlug = 'users'
export const blocksWithLocalizedSameName = 'blocks-same-name'