Clarify promo posts missing subreddit comment.

master
Ethan Dalool 2018-07-13 00:45:59 -07:00
parent 385f9f8f63
commit bfd6466301
1 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,9 @@ class DummyObject:
for (key, val) in FALLBACK_ATTRIBUTES.items():
if not hasattr(self, key):
setattr(self, key, val)
# This seems to occur in rare cases such as promo posts.
# In rare cases, things sometimes don't have a subreddit.
# Promo posts seem to be one example.
FALLBACK_ATTRIBUTES['subreddit'] = DummyObject(display_name=None)
class DummySubmission(DummyObject):