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

Relations: Do not load nice path if "fullpath" is not a visible field #831

Open
wants to merge 3 commits into
base: 1.7
Choose a base branch
from

Conversation

BlackbitDevs
Copy link
Contributor

@BlackbitDevs BlackbitDevs commented Feb 12, 2025

Steps to reproduce bug (it is not really a bug but waste of resources / performance):

  1. Create data object class with a many-to-many object relation,
  • set a Path formatter,
  • as Allowed classes select the class itself,
  • select key as the only visible field,
  • keep Enable Async Load in Admin disabled
  1. Create an object of this class
  2. Assign the object itself to the relation field
  3. Reload object

In network panel you will see a request for get-nice-path which will return the nice path from the path formatter. But this value does not get displayed anywhere (because fullpath is not configured as a visible field).

This PR adds a check if fullpath is actually configured as a visible field and if not, the nice path does not get requested.

…field as the nice path will not get displayed anyway
…field as the nice path will not get displayed anyway
@BlackbitDevs BlackbitDevs changed the title Relations: Do not load nice path if "fullpath" is a visible field Relations: Do not load nice path if "fullpath" is not a visible field Feb 12, 2025
…field as the nice path will not get displayed anyway
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant