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

Fix recursive fields on existing columns #15621

Merged
merged 8 commits into from
Oct 26, 2022
Merged

Conversation

licitdev
Copy link
Member

@licitdev licitdev commented Sep 17, 2022

Description

Fix issues with creation & deletion of recursive fields on existing columns.

  • Prevent changing of field type to or from alias
  • Fix infinite loop when deleting such fields
  • App throws error without exiting drawer if cyclic relations exists

Fixes #16168.
Addresses https://github.com/directus/cloud/issues/651.

Type of Change

  • Bugfix
  • Improvement
  • New Feature
  • Refactor / codestyle updates
  • Other, please describe:

Requirements Checklist

  • New / updated tests are included
  • All tests are passing locally
  • Performed a self-review of the submitted code

If adding a new feature:

  • Documentation was added/updated. PR:

@licitdev licitdev marked this pull request as ready for review September 17, 2022 16:57
Copy link
Member

@br41nslug br41nslug left a comment

Choose a reason for hiding this comment

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

Works as advertised preventing recursive fields with the same fieldName.
tested with a recursive m2o, treeview, o2m, m2m, m2a
image

@rijkvanzanten rijkvanzanten merged commit c996acc into main Oct 26, 2022
@rijkvanzanten rijkvanzanten deleted the fix/recursive-fields branch October 26, 2022 15:51
@licitdev licitdev added this to the Next Release milestone Oct 26, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create M2O with related O2M pointing to itself crashes Directus
4 participants