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] Additional columns dropdown lists all relations classes #1297

Closed
gythaogg opened this issue Oct 16, 2024 · 3 comments · Fixed by #1471 or #1459
Closed

[relations] Additional columns dropdown lists all relations classes #1297

gythaogg opened this issue Oct 16, 2024 · 3 comments · Fixed by #1471 or #1459
Assignees
Labels
bug Something isn't working (properly, as expected, at all)

Comments

@gythaogg
Copy link
Contributor

Why do we need to be able to select the relationship classes as a columns?

If there is a valid usecase, can we consider showing the same text in the columns dropdown item as the column header for consistency? It is confusing to see all of these appear under the same column heading - "ID"

image

@gythaogg gythaogg added the needs-attention This issue or pull request is in need of discussion, information, assessment by team members label Oct 16, 2024
@b1rger
Copy link
Contributor

b1rger commented Oct 18, 2024

Why do we need to be able to select the relationship classes as a columns?

We dont. This is a bug.

@gythaogg gythaogg added the bug Something isn't working (properly, as expected, at all) label Oct 18, 2024
@sennierer
Copy link
Collaborator

https://github.com/acdh-oeaw/apis-core-rdf/blob/main/apis_core/generic/views.py#L135C50-L138
-> maybe the model inheritance manager we use to get the child classes uses annotations

@sennierer
Copy link
Collaborator

or the child classes get in via the class inheritance FKs https://github.com/acdh-oeaw/apis-core-rdf/blob/main/apis_core/generic/views.py#L126-L129

@sennierer sennierer removed the needs-attention This issue or pull request is in need of discussion, information, assessment by team members label Oct 22, 2024
b1rger added a commit that referenced this issue Dec 4, 2024
We don't want to list subclasses as model attribute in the column
selector in the list view, but they are part of the fields list. If the
model uses the InheritanceManager we can check in the `subclasses`
attribute if the field refers to a subclass and exclude those.

Closes: #1297
@b1rger b1rger closed this as completed in 14dcb6f Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (properly, as expected, at all)
Projects
None yet
3 participants