Skip to content

Commit

Permalink
Possible fix for #11
Browse files Browse the repository at this point in the history
Signed-off-by: LilSpazJoekp <15524072+LilSpazJoekp@users.noreply.github.com>
  • Loading branch information
LilSpazJoekp committed Sep 6, 2020
1 parent fb311fc commit 58f8345
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions asyncpraw/models/reddit/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,12 @@ async def parent(self) -> Union["Comment", "Submission"]:
"""
# pylint: disable=no-member

await self._fetch()
await self.submission._fetch()
if not self._fetched:
await self._fetch()

if not self.submission._fetched:
await self.submission._fetch()

if self.parent_id == self.submission.fullname:
return self.submission

Expand Down

0 comments on commit 58f8345

Please sign in to comment.