Ticket #1905: comma.diff

File comma.diff, 1.2 KB (added by gary.wilson@…, 19 years ago)
  • ../django/django/core/management.py

     
    887887                        try:
    888888                            f = opts.get_field(fn)
    889889                        except models.FieldDoesNotExist:
    890                             if not hasattr(cls, fn):
    891                                 e.add(opts, '"admin.list_display" refers to %r, which isn\'t an attribute, method or property.' % fn)
     890                            try:
     891                                if not hasattr(cls, fn):
     892                                    e.add(opts, '"admin.list_display" refers to %r, which isn\'t an attribute, method or property.' % fn)
     893                            except TypeError:
     894                                e.add(opts, 'admin.list_display expects a tuple of strings. Did you perhaps forget to remove the comma at the end of this line when upgrading to post-magic-removal merge?')
    892895                        else:
    893896                            if isinstance(f, models.ManyToManyField):
    894897                                e.add(opts, '"admin.list_display" doesn\'t support ManyToManyFields (%r).' % fn)
Back to Top