Skip to content

Commit

Permalink
Include comments in paper reviewing JSON export (#6253)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiefMaster committed Mar 27, 2024
1 parent 692f130 commit a46dd5e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ Bugfixes
- Hide redundant affiliations tooltip on the Participant Roles list (:pr:`6201`)
- Correctly highlight required "yes/no" registration form field as invalid (:issue:`6109`,
:pr:`6242`)
- Include comments in the Paper Peer Reviewing JSON export (:pr:`6253`)

Accessibility
^^^^^^^^^^^^^
Expand Down
22 changes: 14 additions & 8 deletions indico/modules/events/papers/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,6 @@ class Meta(PaperReviewSchema.Meta):
exclude = [f for f in PaperReviewSchema.Meta.fields if f.startswith('can_')]


class PaperRevisionDumpSchema(PaperRevisionSchema):
class Meta(PaperRevisionSchema.Meta):
fields = (*PaperRevisionSchema.Meta.fields, 'reviews')
exclude = ('reviewer_data',)

reviews = List(Nested(PaperReviewDumpSchema))


class PaperReviewCommentSchema(mm.SQLAlchemyAutoSchema):
user = Nested(UserSchema)
visibility = Nested(PaperCommentVisibilitySchema)
Expand All @@ -195,6 +187,20 @@ class Meta:
'can_view')


class PaperReviewCommentDumpSchema(PaperReviewCommentSchema):
class Meta(PaperReviewCommentSchema.Meta):
exclude = ('can_edit', 'can_view')


class PaperRevisionDumpSchema(PaperRevisionSchema):
class Meta(PaperRevisionSchema.Meta):
fields = (*PaperRevisionSchema.Meta.fields, 'reviews', 'comments')
exclude = ('reviewer_data',)

reviews = List(Nested(PaperReviewDumpSchema))
comments = List(Nested(PaperReviewCommentDumpSchema))


class PaperSchema(mm.Schema):
is_in_final_state = Boolean()
contribution = Nested(BasicContributionSchema)
Expand Down

0 comments on commit a46dd5e

Please sign in to comment.