AttributeError: 'NoneType' object has no attribute 'topics'
Closed this issue · 3 comments
sentry-io commented
Sentry Issue: XPRO-65D
AttributeError: 'NoneType' object has no attribute 'topics'
(28 additional frame(s) were not displayed)
...
File "rest_framework/serializers.py", line 663, in to_representation
return [
File "rest_framework/serializers.py", line 664, in <listcomp>
self.child.to_representation(item) for item in iterable
File "rest_framework/serializers.py", line 515, in to_representation
ret[field.field_name] = field.to_representation(attribute)
File "rest_framework/fields.py", line 1882, in to_representation
return method(value)
File "courses/serializers.py", line 158, in get_topics
[{"name": topic.name} for topic in instance.page.topics.all()],
pdpinch commented
It looks like we throw an error when someone tries to checkout with a course that doesn't have a topic set. This shouldn't be a requirement.
arslanashraf7 commented
#2644 should fix this.
arslanashraf7 commented
Closed via #2644