Skip to content

Commit

Permalink
Check field value before accessing an attribute
Browse files Browse the repository at this point in the history
Signed-off-by: Iacopo Spalletti <[email protected]>
  • Loading branch information
yakky authored and joemull committed Jun 25, 2024
1 parent 0f93c4b commit 9daf7f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/review/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ReviewAdmin(admin_utils.ArticleFKModelAdmin):
'form', 'review_file')

def _round(self, obj):
return obj.review_round.round_number if obj else ''
return obj.review_round.round_number if obj and obj.review_round else ''

inlines = [
admin_utils.ReviewAssignmentAnswerInline,
Expand Down

0 comments on commit 9daf7f8

Please sign in to comment.