Skip to content

Commit

Permalink
Fix handling of StreamRule in list passed to delete_rules
Browse files Browse the repository at this point in the history
Resolves #1942
  • Loading branch information
Harmon758 committed Aug 18, 2022
1 parent 598ea64 commit 458fd73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tweepy/asynchronous/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ async def delete_rules(self, ids, **params):
ids = (ids,)
for id in ids:
if isinstance(id, StreamRule):
json["delete"]["ids"].append(str(StreamRule.id))
json["delete"]["ids"].append(str(id.id))
else:
json["delete"]["ids"].append(str(id))

Expand Down
2 changes: 1 addition & 1 deletion tweepy/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ def delete_rules(self, ids, **params):
ids = (ids,)
for id in ids:
if isinstance(id, StreamRule):
json["delete"]["ids"].append(str(StreamRule.id))
json["delete"]["ids"].append(str(id.id))
else:
json["delete"]["ids"].append(str(id))

Expand Down

0 comments on commit 458fd73

Please sign in to comment.