Skip to content

Commit

Permalink
Merge 2a438fd into ee44ca7
Browse files Browse the repository at this point in the history
  • Loading branch information
LilSpazJoekp committed Jan 24, 2023
2 parents ee44ca7 + 2a438fd commit 9e487cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions praw/models/reddit/removal_reasons.py
Expand Up @@ -150,8 +150,10 @@ def _removal_reason_list(self) -> List[RemovalReason]:
API_PATH["removal_reasons_list"].format(subreddit=self.subreddit)
)
return [
RemovalReason(self._reddit, self.subreddit, _data=reason_data)
for id, reason_data in response["data"].items()
RemovalReason(
self._reddit, self.subreddit, _data=response["data"][reason_id]
)
for reason_id in response["order"]
]

def __getitem__(self, reason_id: Union[str, int, slice]) -> RemovalReason:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/models/reddit/test_removal_reasons.py
Expand Up @@ -54,7 +54,7 @@ def test_update(self, reddit):
def test_update_empty(self, reddit):
reddit.read_only = False
subreddit = reddit.subreddit(pytest.placeholders.test_subreddit)
reason = subreddit.mod.removal_reasons[0]
reason = subreddit.mod.removal_reasons[1]
reason.update()


Expand Down

0 comments on commit 9e487cb

Please sign in to comment.