Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API hangs when an empty array is inserted into a reference field #306

Closed
fra967 opened this issue Jun 28, 2017 · 0 comments
Closed

API hangs when an empty array is inserted into a reference field #306

fra967 opened this issue Jun 28, 2017 · 0 comments
Assignees

Comments

@fra967
Copy link

fra967 commented Jun 28, 2017

Consider this collection

{
  "fields": {
    "name": {
      "type": "String",
      "label": "Name",
      "required": false
    },
    "images": {
      "type": "Reference",
      "label": "Image",
      "required": false,
      "settings": {
        "collection": "media",
        "multiple": true,
        "fields": [
          "image",
          "altText",
          "caption",
          "credits"
        ]
      }
    }
  },
  "settings": {
    "authenticate": true,
    "count": 20
  }
}

and the following insert requests:

{"name":"My name","images":""}
works fine, an empty string is inserted

{"name":"My name","images":[""]}
works fine, an array with an empty string is inserted

{"name":"My name","images":[]}
hangs indefinitely: i would expect an empty array to be inserted (or nothing), and a response to be returned

API 2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants