﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28282	Index.set_name_with_model() not called on models without a base meta class	Jon Dufresne	nobody	"From https://github.com/django/django/blob/23825b2494a1edb1e02d57dbdc7eca0614cefcc8/django/db/models/base.py#L296-L303

{{{
        if base_meta and base_meta.abstract and not abstract:
            new_class._meta.indexes = [copy.deepcopy(idx) for idx in new_class._meta.indexes]
            # Set the name of _meta.indexes. This can't be done in
            # Options.contribute_to_class() because fields haven't been added
            # to the model at that point.
            for index in new_class._meta.indexes:
                if not index.name:
                    index.set_name_with_model(new_class)
}}}

I believe the condition should be changed to `if (not base_meta or base_meta.abstract) and not abstract:`. Or maybe simply `if not abstract`? As of right now simple classes inheriting from `models.Model` have `base_meta` as `None` and so the indexes aren't named."	Bug	closed	Database layer (models, ORM)	1.11	Release blocker	fixed			Ready for checkin	1	0	0	0	0	0
