From 451e921210677ee0a618849f189bdfeea497a00c Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 29 Oct 2021 11:22:28 -0500 Subject: [PATCH] Fix IdIterator to pass API instance to parsers and models --- tweepy/cursor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tweepy/cursor.py b/tweepy/cursor.py index e89b985..d3ccdd4 100644 --- a/tweepy/cursor.py +++ b/tweepy/cursor.py @@ -166,14 +166,14 @@ class IdIterator(BaseIterator): if self.index >= len(self.results) - 1: data = self.method(max_id=self.max_id, parser=RawParser(), *self.args, **self.kwargs) - # This is a special invocation that returns the underlying - # APIMethod class model = ModelParser().parse( - data, payload_list=self.method.payload_list, + data, api = self.method.__self__, + payload_list=self.method.payload_list, payload_type=self.method.payload_type ) result = self.method.__self__.parser.parse( - data, payload_list=self.method.payload_list, + data, api = self.method.__self__, + payload_list=self.method.payload_list, payload_type=self.method.payload_type ) -- 2.25.1