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

Inconsistent behavior with empty allow in schema field #431

Closed
philippguertler opened this issue Jun 5, 2018 · 1 comment · Fixed by #714
Closed

Inconsistent behavior with empty allow in schema field #431

philippguertler opened this issue Jun 5, 2018 · 1 comment · Fixed by #714

Comments

@philippguertler
Copy link
Contributor

Gentics Mesh Version

  • v0.21.1

Problem

Micronode fields and micronode list fields behave differently when the allow property is empty. In the list field, every microschema is allowed, but in the single micro node field, no microschema is allowed.

Reproducer

Create this schema:

{
  "name": "testschema",
  "fields": [
    {
      "name": "single",
      "type": "micronode",
      "allow": []
    },
    {
      "name": "multiple",
      "type": "list",
      "listType": "micronode",
      "allow": []
    }
  ]
}

Create any microschema:

{
  "name": "position",
  "fields": [
    {
      "name": "longitude",
      "type": "number"
    },
    {
      "name": "latitude",
      "type": "number"
    }
  ]
}

Then follow these steps:

  • Create a node with the single field set -> results in error
  • Create a node with the multiple field set -> works

Expected behaviour and actual behaviour

I expected the same result for the last two requests. I don't think it is defined anywhere what should happen when the allow field is empty.

@Jotschi
Copy link
Contributor

Jotschi commented May 7, 2019

Released with 0.31.5

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

Successfully merging a pull request may close this issue.

3 participants