-
Notifications
You must be signed in to change notification settings - Fork 26
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
Tree taxonomy #1788
Tree taxonomy #1788
Conversation
actlikewill
commented
Jul 14, 2023
•
edited
Loading
edited
- adds tree taxonomy
5280df3
to
6072b06
Compare
c3e747c
to
4c97572
Compare
@longhotsummer @goose-life Still a few things I'd want to add. Particularly, the toc filter needs a way to mark active or inactive states, which I think needs a custom JS component. |
a65389c
to
37d2f6d
Compare
37d2f6d
to
d060c0e
Compare
41b5630
to
1a7183d
Compare
d7a5f24
to
6a617b9
Compare
4e28c88
to
8f5c2ab
Compare
if vocabulary.level_1: | ||
log.info(f"Creating child node {vocabulary.level_1}") | ||
child_1 = TaxonomyTopic.add_child(root, name=vocabulary.level_1) | ||
for work in vocabulary.works.all(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're over-thinking this. If vocabulary
has a level_2
, then the works are tagged at the second level. Otherwise, they're tagged at the first level.
See here how level_1
is duplicated when there is a level_2
:
So you only need to apply EITHER level_2
(if it's not blank) OR fall back to level_1
. Not both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 👍
8f5c2ab
to
1b6a0d5
Compare
1b6a0d5
to
5704618
Compare