Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Anatomy schema validation #1864

Merged
merged 3 commits into from
Jul 27, 2021
Merged

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Jul 27, 2021

Description

Settings entity anatomy should have all children as groups to avoid unresolved overrides.

Changes

  • anatomy entity is validating that all it's children are groups otherwise it can break project data

How to test

  1. try to set is_group to True on entity which is deeper in anatomy settings hierarchy
  2. error should appear on settings ui open

@iLLiCiTiT iLLiCiTiT added backend duplicate This issue or pull request already exists type: enhancement Enhancements to existing functionality labels Jul 27, 2021
@iLLiCiTiT iLLiCiTiT self-assigned this Jul 27, 2021
@iLLiCiTiT iLLiCiTiT removed the duplicate This issue or pull request already exists label Jul 27, 2021
Copy link
Member

@jakubjezek001 jakubjezek001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the approach is good, but the message is quite difficult to understand, at least to me

In case of situation when I have added is_group to children of imageio:
image
Is it possible to have somehting like:
Following entities should not be set to 'is_group=true' > 'project_anatomy/imageio/hiero, ...'

Or something like this.

@jakubjezek001
Copy link
Member

jakubjezek001 commented Jul 27, 2021

the same as here
image

Set following anatomy children to 'is_group=true' > 'project_anatomy/imageio'

@iLLiCiTiT
Copy link
Member Author

In case of situation when I have added is_group to children of imageio:

In this case I can't much tell what is suggested solution but I agree the message can be better.

the same as here

That is 100% doable

@iLLiCiTiT iLLiCiTiT merged commit 95f9e6f into develop Jul 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Enhancements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants