Ticket #4050: base.py.2.diff

File base.py.2.diff, 793 bytes (added by Ludvig Ericson <ludvig.ericson@…>, 18 years ago)
  • django/db/models/base.py

     
    2323    def __new__(cls, name, bases, attrs):
    2424        # If this isn't a subclass of Model, don't do anything special.
    2525        try:
    26             if not filter(lambda b: issubclass(b, Model), bases):
    27                 return super(ModelBase, cls).__new__(cls, name, bases, attrs)
     26            for base in bases:
     27                if issubclass(base, Model):
     28                    return super(ModelBase, cls).__new__(cls, name, bases, attrs)
    2829        except NameError:
    2930            # 'Model' isn't defined yet, meaning we're looking at Django's own
    3031            # Model class, defined below.
Back to Top