Django 1.8: Problem with GenericRelation

57 views
Skip to first unread message

hemabe

unread,
May 12, 2015, 3:44:40 PM5/12/15
to django...@googlegroups.com
Hi,

I upgraded from Django 1.7 to 1.8 and now I get this error, if I try to access the content_object of a GenericRelation:

ERROR: 'NoneType' object has no attribute '_base_manager'

Context:
I overwrote the save-method in my app and try to get information about the object, which is being saved. I need
to know, of which type the generic relation is. So i try to get the content_object and this throws this error.

The code is as follows and works for Django 1.7:

    def save(self, update=False, *args, **kwargs):
        ...
        obj = self.content_object

        # throws an error 


Any idea are very welcome.

Thnka,

Hermi

Reply all
Reply to author
Forward
0 new messages