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

question (relations): subj_class and obj_class dropdown values #1390

Closed
gythaogg opened this issue Nov 14, 2024 · 1 comment · Fixed by #1425 or #1428
Closed

question (relations): subj_class and obj_class dropdown values #1390

gythaogg opened this issue Nov 14, 2024 · 1 comment · Fixed by #1425 or #1428
Assignees
Labels
app-relations Centered on relations – classes and functionality linking entities together question For any kind of question, whether about usage, contributing or the project in general

Comments

@gythaogg
Copy link
Contributor

Is there a way to make the dropdown values in Subject class and Object class fields more specific to the relation we are viewing?

For example if we are in this page https://discworld.acdh-ch-dev.oeaw.ac.at/sample_project.livesin/ - (person) lives in (place)
could we ensure that the subj_class only contains "person" and the obj_classonly contains "place"?

Obviously this is not a good example, but when subj or obj can take multiple entity types; it would be useful to filter the results only via the available/allowed content types in the subj and obj fields.

Apologies to @b1rger I might have already discussed this with you in person but can't quite remember what explanation you gave me, Thanks!

@gythaogg gythaogg added the question For any kind of question, whether about usage, contributing or the project in general label Nov 14, 2024
@b1rger
Copy link
Contributor

b1rger commented Nov 14, 2024

Ah, yeah, that makes sense. In addition, we can just remove the dropdown if there is only one option

@gythaogg gythaogg added the app-relations Centered on relations – classes and functionality linking entities together label Nov 15, 2024
b1rger added a commit that referenced this issue Nov 21, 2024
Replace the "hardcoded" `subj_class` and `obj_class` filters in the
RelationFilterSet with more dynamic versions that take a list of models
that can be possilbe choices. If there is only one choice, the filter is
simply not added.

Closes: #1390
b1rger added a commit that referenced this issue Nov 22, 2024
Replace the "hardcoded" `subj_class` and `obj_class` filters in the
RelationFilterSet with more dynamic versions that take a list of models
that can be possilbe choices. If there is only one choice, the filter is
simply not added.

Closes: #1390
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app-relations Centered on relations – classes and functionality linking entities together question For any kind of question, whether about usage, contributing or the project in general
Projects
None yet
2 participants