fix(ui): create-first-user crashes when users collection has join field (#10871)

Fixes https://github.com/payloadcms/payload/issues/10870
Now we hide join fields from the `/create-first-user` view since they're
not meaningful there.
This commit is contained in:
Sasha
2025-01-29 19:52:22 +02:00
committed by GitHub
parent 5bd17cc111
commit 2f66bdc2dc
5 changed files with 80 additions and 41 deletions

View File

@@ -29,8 +29,21 @@ export default buildConfigWithDefaults({
importMap: {
baseDir: path.resolve(dirname),
},
user: 'users',
},
collections: [
{
slug: 'users',
auth: true,
fields: [
{
type: 'join',
collection: 'posts',
on: 'author',
name: 'posts',
},
],
},
Posts,
Categories,
HiddenPosts,