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

Comments

3 participants
@philippguertler
Copy link
Contributor

commented Jun 5, 2018

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 Jotschi added the bug label Oct 18, 2018

@mephinet mephinet added the quick win label Jan 17, 2019

@mephinet mephinet added this to the 1.0.0 milestone Jan 18, 2019

@Jotschi Jotschi added this to Pending in 1.0 Apr 24, 2019

@Jotschi Jotschi moved this from Pending to Reviewed in 1.0 Apr 25, 2019

@Jotschi

This comment has been minimized.

Copy link
Member

commented May 7, 2019

Released with 0.31.5

@Jotschi Jotschi moved this from Reviewed / Merged to Released in 1.0 May 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.