[Potential bug] global.update() with a non-localized relationship fields?

default discord avatar
3 months ago

Take the following global:

  slug: 'test',
  label: 'Test',
  fields: [
      name: 'relationship',
      type: 'relationship',
      relationTo: 'regions',
      required: false,
      localized: false,
      name: 'description',
      type: 'textarea',
      required: true,
      localized: true,

Through the admin, everything works fine. I can change locale, add/change the description field, and it saves no problem.

Now when I try to do the following


request to the API



  "description": "Description en francais"

I get the following error:

  data: [...],
  message: "The following field is invalid: relationship"
  name: "ValidationError"

This looks like a bug to me, but wanted to check with y'all first to make sure I didn't miss something obvious. 🤔

Reproed it in the main repo, created a GitHub issue:


    Open the post
    Continue the discussion in Discord
    Like what we're doing?
    Star us on GitHub!


    Connect with the Payload Community on Discord



    Can't find what you're looking for?

    Get help straight from the Payload team with an Enterprise License.