charettes / django-colorful

Extension to the Django web framework that provides database and form color fields
https://pypi.python.org/pypi/django-colorful
MIT License
169 stars 58 forks source link

South schemamigration fail #12

Closed tecnosegugio closed 10 years ago

tecnosegugio commented 10 years ago

With 1.0.0 version I can't create a schemamigration of a model using the RGBColorField. I got this error:

Traceback (most recent call last):
  File "./manage.py", line 12, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/propilei/django/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/opt/propilei/django/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/propilei/django/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/opt/propilei/django/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/opt/propilei/django/local/lib/python2.7/site-packages/south/management/commands/schemamigration.py", line 159, in handle
    action.add_forwards(forwards_actions)
  File "/opt/propilei/django/local/lib/python2.7/site-packages/south/creator/actions.py", line 39, in add_forwards
    forwards.append(self.forwards_code())
  File "/opt/propilei/django/local/lib/python2.7/site-packages/south/creator/actions.py", line 355, in forwards_code
    return self._code(self.old_field, self.new_field, self.new_def)
  File "/opt/propilei/django/local/lib/python2.7/site-packages/south/creator/actions.py", line 349, in _code
    "field_def": self.triple_to_def(new_def),
  File "/opt/propilei/django/local/lib/python2.7/site-packages/south/creator/actions.py", line 63, in triple_to_def
    ", ".join(triple[1] + ["%s=%s" % (kwd, val) for kwd, val in triple[2].items()]), # args and kwds
TypeError: can only concatenate tuple (not "list") to tuple

Downgrading to the 0.1.3 version, schemamigration is created without errors.

charettes commented 10 years ago

This has been fixed by 367eb22b14ce169078cc4aed01cb137b61ecc34c and part of the 1.0.1 release.