Files
payload/packages
Jarrod Flesch 4030e212f5 fix: allow self referencing relationships when adding new collections to config (#9360)
### What?
Unable to add collections to the config dynamically if they reference
their own collection in a relationship field.

This was discovered while working on the folder view feature which
dynamically adds collections to your config if it is enabled per
collection.

### Why?
When `sanitizeCollection` runs, it takes the current config. If you are
sanitizing a collection before adding it to the config, that collection
cannot have any self referencing relationship fields on it otherwise it
fails the validRelationships check.

### How?
Using a reducer we now initialize the validRelationships variable with
the incoming collection slug.
2024-11-19 16:22:23 -05:00
..
2024-11-19 14:33:41 -05:00
2024-11-19 14:33:41 -05:00
2024-11-19 14:33:41 -05:00
2024-11-19 14:33:41 -05:00