Commits

thas...@yandex-team.ru  committed e495d75

Fixed issue #776 for Django 1.5 and higher

  • Participants
  • Parent commits a2d15ea

Comments (0)

Files changed (1)

File south/db/generic.py

 
         # If there is just one column in the index, use a default algorithm from Django
         if len(column_names) == 1 and not suffix:
+            try:
+                _hash = self._digest([column_names[0]])
+            except TypeError:
+                # Django < 1.5 backward compatibility.
+                _hash = self._digest(column_names[0])
             return self.shorten_name(
-                '%s_%s' % (table_name, self._digest(column_names[0]))
+                '%s_%s' % (table_name, _hash),
             )
 
         # Else generate the name for the index by South