1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Expanded the fix in [12663] to cover CSS declarations, which were also affected by the bug. Refs #12879.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12665 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
James Bennett
2010-03-03 08:17:51 +00:00
parent 9a82ca0a36
commit 6edcd11aed
2 changed files with 8 additions and 4 deletions

View File

@@ -82,7 +82,9 @@ class Media(StrAndUnicode):
def add_css(self, data):
if data:
for medium, paths in data.items():
self._css.setdefault(medium, []).extend([path for path in paths if path not in self._css[medium]])
for path in paths:
if not self._css.get(medium) or path not in self._css[medium]:
self._css.setdefault(medium, []).append(path)
def __add__(self, other):
combined = Media()