Skip to content

Commit

Permalink
Merge pull request openedx#32608 from openedx/feanil/small_fix
Browse files Browse the repository at this point in the history
fix: Don't assume there is a context.
  • Loading branch information
feanil committed Jul 3, 2023
2 parents 286a9cd + cf9c4e8 commit 567704c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/bookmarks/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(self, *args, **kwargs):
# Drop any fields that are not specified in the `fields` argument.
required_fields = set(fields)

if 'request' in kwargs['context'] and is_schema_request(kwargs['context']['request']):
if 'context' in kwargs and 'request' in kwargs['context'] and is_schema_request(kwargs['context']['request']):
# We are serving the schema: include everything
required_fields.update(OPTIONAL_FIELDS)

Expand Down

0 comments on commit 567704c

Please sign in to comment.