Ticket #4050: base.py.diff

File base.py.diff, 658 bytes (added by Ludvig Ericson <ludvig.ericson@…>, 8 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):
     26            if not any(issubclass(base, Model) for base in bases):
    2727                return super(ModelBase, cls).__new__(cls, name, bases, attrs)
    2828        except NameError:
    2929            # 'Model' isn't defined yet, meaning we're looking at Django's own
Back to Top