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

refactor(utils): use contenttype instead of model name for helper #739

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

b1rger
Copy link
Contributor

@b1rger b1rger commented Mar 21, 2024

The get_classes_with_allowed_relation_from method created a list of
possible related models based on the name of one model. It then returned
the names of those models as strings. It makes more sense to simply use
contenttypes instead of model names, especially since the Property model
stores the possible subj and obj classes as ContentTypes.
This commit refactors the method and also updates triple_sidebar which
is the only funciton that uses the
get_classes_with_allowed_relation_from method.

Closes: #254

@b1rger b1rger force-pushed the birger/254-refactor-get_classes branch from 6fe65c6 to 7af6000 Compare March 21, 2024 13:43
@b1rger b1rger marked this pull request as ready for review March 21, 2024 13:44
@b1rger b1rger force-pushed the birger/254-refactor-get_classes branch 4 times, most recently from 5549d48 to b4d8486 Compare June 17, 2024 14:03
The `get_classes_with_allowed_relation_from` method created a list of
possible related models based on the name of one model. It then returned
the names of those models as strings. It makes more sense to simply use
contenttypes instead of model names, especially since the Property model
stores the possible subj and obj classes as ContentTypes.
This commit refactors the method and also updates `triple_sidebar` which
is the only function that uses the
`get_classes_with_allowed_relation_from` method.

Closes: #254
@b1rger b1rger force-pushed the birger/254-refactor-get_classes branch from b4d8486 to 4a877fd Compare June 17, 2024 14:05
@b1rger b1rger merged commit 008babe into main Jun 18, 2024
11 checks passed
@b1rger b1rger deleted the birger/254-refactor-get_classes branch June 20, 2024 09:50
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.

Refactor or extend get_classes_with_allowed_relation_from to work with ContentType
1 participant