Updated template tags for bug when not passing in a limit
1 files changed, 8 insertions(+), 1 deletions(-) M twittersync/templatetags/twittersync_tags.py
M twittersync/templatetags/twittersync_tags.py +8 -1
@@ 62,8 62,15 @@ def get_latest_tweets(parser, token): if limit is None: limit = getattr(settings, 'TWITTERSYNC_LATEST_TWEETS', 5) + try: + # needed because it may not be passed via the + # template token. + limit = parser.compile_filter(limit) + except TypeError: + pass + return LatestTweets( parser.compile_filter(account), - parser.compile_filter(limit), + limit, parser.compile_filter(varname), )