Describe the Bug
Slug field is set as unique in payload code (
).
If you use it in a multi tenant collection you can't create the same slug for different tenants.
The slug should be unique as a compound index with the tenant field.
Link to the code that reproduces this issue
https://github.com/payloadcms/payload
Reproduction Steps
- Install/configure multi tenancy plugin
- Create a collection with a slug field
- Create 2 different tenants
- Try to use the same slug for both tenants
Which area(s) are affected? (Select all that apply)
plugin: multi-tenant
Environment Info
Describe the Bug
Slug field is set as unique in payload code (
payload/packages/payload/src/fields/baseFields/slug/index.ts
Line 148 in b6a336e
If you use it in a multi tenant collection you can't create the same slug for different tenants.
The slug should be unique as a compound index with the tenant field.
Link to the code that reproduces this issue
https://github.com/payloadcms/payload
Reproduction Steps
Which area(s) are affected? (Select all that apply)
plugin: multi-tenant
Environment Info