﻿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
30384	Django 1.11 Upgrade -> runserver Error in db/models/fields/related.py _check_table_uniqueness	Eric Neumann	nobody	"Hello,

I'm currently upgrading from Django 1.10 to 1.11. I've addressed all deprecation issues and everything is working fine, our app is running on gunicorn and django shell works. However, runserver is throwing an error that I can't seem to sort out. Looks like it's happening on the related groups field to the user model. We are using a custom user model which was working fine in 1.10. Below is the stack trace. Appreciate any help in getting this resolved. Cheers!

Unhandled exception in thread started by <function wrapper at 0x7f6d8b8358c0>
Traceback (most recent call last):
  File ""/home/manzama/.virtualenvs/manzama/local/lib/python2.7/site-packages/django/utils/autoreload.py"", line 227, in wrapper
    fn(*args, **kwargs)
  File ""/home/manzama/.virtualenvs/manzama/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py"", line 125, in inner_run
    self.check(display_num_errors=True)
  File ""/home/manzama/.virtualenvs/manzama/local/lib/python2.7/site-packages/django/core/management/base.py"", line 359, in check
    include_deployment_checks=include_deployment_checks,
  File ""/home/manzama/.virtualenvs/manzama/local/lib/python2.7/site-packages/django/core/management/base.py"", line 346, in _run_checks
    return checks.run_checks(**kwargs)
  File ""/home/manzama/.virtualenvs/manzama/local/lib/python2.7/site-packages/django/core/checks/registry.py"", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File ""/home/manzama/.virtualenvs/manzama/local/lib/python2.7/site-packages/django/core/checks/model_checks.py"", line 30, in check_all_models
    errors.extend(model.check(**kwargs))
  File ""/home/manzama/.virtualenvs/manzama/local/lib/python2.7/site-packages/django/db/models/base.py"", line 1282, in check
    errors.extend(cls._check_fields(**kwargs))
  File ""/home/manzama/.virtualenvs/manzama/local/lib/python2.7/site-packages/django/db/models/base.py"", line 1359, in _check_fields
    errors.extend(field.check(from_model=cls, **kwargs))
  File ""/home/manzama/.virtualenvs/manzama/local/lib/python2.7/site-packages/django/db/models/fields/related.py"", line 1195, in check
    errors.extend(self._check_table_uniqueness(**kwargs))
  File ""/home/manzama/.virtualenvs/manzama/local/lib/python2.7/site-packages/django/db/models/fields/related.py"", line 1446, in _check_table_uniqueness
    for model in self.opts.apps.get_models(include_auto_created=True)
  File ""/home/manzama/.virtualenvs/manzama/local/lib/python2.7/site-packages/django/db/models/fields/related.py"", line 1447, in <dictcomp>
    if model != self.remote_field.through and model._meta.managed
AttributeError: 'ModelOptions' object has no attribute 'managed'
"	Bug	closed	Database layer (models, ORM)	1.11	Normal	invalid	AttributeError: 'ModelOptions' object has no attribute 'managed'		Unreviewed	0	0	0	0	0	0
