{"action":"created","issue":{"url":"https://api.github.com/repos/rbarrois/factory_boy/issues/231","labels_url":"https://api.github.com/repos/rbarrois/factory_boy/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/rbarrois/factory_boy/issues/231/comments","events_url":"https://api.github.com/repos/rbarrois/factory_boy/issues/231/events","html_url":"https://github.com/rbarrois/factory_boy/issues/231","id":106745849,"number":231,"title":"  FactoryBoy fails when custom Manager is defined on abstract model (multi inheritance)","user":{"login":"user0007","id":1457761,"avatar_url":"https://avatars.githubusercontent.com/u/1457761?v=3","gravatar_id":"","url":"https://api.github.com/users/user0007","html_url":"https://github.com/user0007","followers_url":"https://api.github.com/users/user0007/followers","following_url":"https://api.github.com/users/user0007/following{/other_user}","gists_url":"https://api.github.com/users/user0007/gists{/gist_id}","starred_url":"https://api.github.com/users/user0007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/user0007/subscriptions","organizations_url":"https://api.github.com/users/user0007/orgs","repos_url":"https://api.github.com/users/user0007/repos","events_url":"https://api.github.com/users/user0007/events{/privacy}","received_events_url":"https://api.github.com/users/user0007/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-16T10:35:35Z","updated_at":"2015-10-30T10:58:25Z","closed_at":null,"body":"The fix from #201 does not include multi inheritance. Eg:\r\n\r\n    class CustomManager(models.Manager):\r\n        pass\r\n\r\n    class BaseModel(models.Model):\r\n        custom_objects = CustomManager()\r\n    \r\n        class Meta:\r\n            abstract = True\r\n\r\n    class BaseAPIModel(BaseModel):\r\n        username = models.EmailField()\r\n    \r\n        class Meta:\r\n            abstract = True\r\n\r\n    class MyModel(BaseAPIModel):\r\n        pass\r\n\r\n    class MyModelFactory(factory.DjangoModelFactory):\r\n        class Meta:\r\n            model = MyModel\r\n\r\n    MyModelFactory.create()\r\n\r\n    Traceback (most recent call last):\r\n      File \"/home/myuser/projects/venvs/myproject/local/lib/python2.7/site-packages/factory/base.py\", line 559, in create\r\n        return cls._generate(True, attrs)\r\n      File \"/home/myuser/projects/venvs/myproject/local/lib/python2.7/site-packages/factory/base.py\", line 484, in _generate\r\n        obj = cls._prepare(create, **attrs)\r\n      File \"/home/myuser/projects/myproject/myproject/apps/users/tests/factories.py\", line 11, in _prepare\r\n        user = super(BaseUserFactory, cls)._prepare(create, **kwargs)\r\n      File \"/home/myuser/projects/venvs/myproject/local/lib/python2.7/site-packages/factory/base.py\", line 459, in _prepare\r\n        return cls._create(model_class, *args, **kwargs)\r\n      File \"/home/myuser/projects/venvs/myproject/local/lib/python2.7/site-packages/factory/django.py\", line 144, in _create\r\n        manager = cls._get_manager(model_class)\r\n      File \"/home/myuser/projects/venvs/myproject/local/lib/python2.7/site-packages/factory/django.py\", line 118, in _get_manager\r\n        manager = model_class.objects\r\n      File \"/home/myuser/projects/venvs/myproject/local/lib/python2.7/site-packages/django/db/models/manager.py\", line 267, in __get__\r\n        self.model._meta.object_name,\r\n    AttributeError: Manager isn't available; BaseAPIModel is abstract\r\n\r\nEverything works ok when using pure models:\r\n\r\n    >>> MyModel.objects.all()\r\n    [...]\r\n    >>> MyModel.custom_objects.all()\r\n    [...]"},"comment":{"url":"https://api.github.com/repos/rbarrois/factory_boy/issues/comments/152495754","html_url":"https://github.com/rbarrois/factory_boy/issues/231#issuecomment-152495754","issue_url":"https://api.github.com/repos/rbarrois/factory_boy/issues/231","id":152495754,"user":{"login":"frague59","id":1118696,"avatar_url":"https://avatars.githubusercontent.com/u/1118696?v=3","gravatar_id":"","url":"https://api.github.com/users/frague59","html_url":"https://github.com/frague59","followers_url":"https://api.github.com/users/frague59/followers","following_url":"https://api.github.com/users/frague59/following{/other_user}","gists_url":"https://api.github.com/users/frague59/gists{/gist_id}","starred_url":"https://api.github.com/users/frague59/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frague59/subscriptions","organizations_url":"https://api.github.com/users/frague59/orgs","repos_url":"https://api.github.com/users/frague59/repos","events_url":"https://api.github.com/users/frague59/events{/privacy}","received_events_url":"https://api.github.com/users/frague59/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T10:58:25Z","updated_at":"2015-10-30T10:58:25Z","body":"+1\r\n"}}