ramusus / django-twitter-api

Django implementation for Twitter API based on Django models
BSD 3-Clause "New" or "Revised" License
32 stars 17 forks source link

'ManyToManyHistoryThroughManager' object has no attribute '_fk_val' #7

Closed nachouve closed 9 years ago

nachouve commented 9 years ago

In the django admin GUI, trying to access to one twitter_api Status, I get the following error:

'ManyToManyHistoryThroughManager' object has no attribute '_fk_val'

Request Method:     GET
Request URL:    http://localhost:5000/admin/twitter_api/status/548968510400258048/
Django Version:     1.7.1
Exception Type:     AttributeError
Exception Value:    

'ManyToManyHistoryThroughManager' object has no attribute '_fk_val'

Exception Location:     /var/tmp/tweetsmix/env/lib/python2.7/site-packages/m2m_history/descriptors.py in get_query_set_through, line 74
Python Executable:  /var/tmp/tweetsmix/env/bin/python

I'm using django-m2m-history==0.1.3.

nachouve commented 9 years ago

I don't really know if it is correct, but It works adding '_fk_val = None' on:

    class ManyToManyHistoryThroughManager(baseManagerClass):        

        # To avoid AttributeError
        _fk_val = None 

        # time of altering transaction
        time = None
ramusus commented 9 years ago

Try to do

pip install django_m2m_history --upgrade

I commited new version with Django 1.7 support