mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #28711 -- Fixed unordered_list template filter with lazy translations.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Default variable filters."""
|
||||
import random as random_module
|
||||
import re
|
||||
import types
|
||||
from decimal import ROUND_HALF_UP, Context, Decimal, InvalidOperation
|
||||
from functools import wraps
|
||||
from operator import itemgetter
|
||||
@@ -615,7 +616,7 @@ def unordered_list(value, autoescape=True):
|
||||
except StopIteration:
|
||||
yield item, None
|
||||
break
|
||||
if not isinstance(next_item, str):
|
||||
if isinstance(next_item, (list, tuple, types.GeneratorType)):
|
||||
try:
|
||||
iter(next_item)
|
||||
except TypeError:
|
||||
|
||||
Reference in New Issue
Block a user