Skip to content

Commit

Permalink
Fixed issue with contributors when adding new edition.
Browse files Browse the repository at this point in the history
  • Loading branch information
Makistos committed Sep 29, 2024
1 parent 7cc6f92 commit db1b18e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/impl_editions.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,9 @@ def create_edition(params: Any) -> ResponseType:
if "contributors" in data:
contributors = get_work_contributors(session, part.work_id)
for contrib in data["contributors"]:
contributors.append(contrib)
if ("person" in contrib and "id" in contrib["person"] and
contrib["person"]["id"] != 0):
contributors.append(contrib)
update_edition_contributors(session, edition, contributors)
try:
session.commit()
Expand Down

0 comments on commit db1b18e

Please sign in to comment.