-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add support for multiple affiliations #8
Add support for multiple affiliations #8
Conversation
ab8f5ac
to
5f5c928
Compare
16e5e8e
to
f830c86
Compare
person_link.jacow_affiliations = [] | ||
db.session.flush() | ||
person_link.jacow_affiliations = [affiliations_cls(affiliation_id=id, display_order=i) |
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.
this is quite ugly but it's a workaround for an error related to the unique constraint i put on (person_link_id, display_order)
. should I get rid of that constraint altogether? or is there a better fix for this
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 it;s fine. there's no other data referencing the jacow affiliations so no problem w/ recreating them while saving. it's all in a transaction anyway
b7404b7
to
56f4b34
Compare
33b5a6c
to
a6e37c1
Compare
ac22d4a
to
3ad6a58
Compare
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.
note: i rebased and fixed the linter issues
3ad6a58
to
8276a9a
Compare
indico_jacow/migrations/20231219_2030_7e432803e968_add_multiple_affiliations.py
Outdated
Show resolved
Hide resolved
indico_jacow/migrations/20231219_2030_7e432803e968_add_multiple_affiliations.py
Outdated
Show resolved
Hide resolved
indico_jacow/migrations/20231219_2030_7e432803e968_add_multiple_affiliations.py
Outdated
Show resolved
Hide resolved
indico_jacow/migrations/20231219_2030_7e432803e968_add_multiple_affiliations.py
Outdated
Show resolved
Hide resolved
indico_jacow/migrations/20231219_2030_7e432803e968_add_multiple_affiliations.py
Outdated
Show resolved
Hide resolved
2011004
to
f47f18a
Compare
Also includes some simplifications to the code
f47f18a
to
251379e
Compare
Depends on indico/indico#6102
This PR adds support for multiple affiliations for authors in abstracts&contributions.