django-mockups
django-mockups copied to clipboard
Error while processing m2m
Hello,
I am using mocks from master branch ( f81e01892d97) and got the following strack trace :
/usr/lib64/python2.6/site-packages/mockups/helpers.py:21: UserWarning: Model Lead
not in registry
warnings.warn('Model %s
not in registry' % model.name)
Traceback (most recent call last):
File "./manage.py", line 11, in
My model can be found here : (is is the Lead class) https://github.com/digitalfox/pydici/blob/master/leads/admin.py
Thanks for your help/
The Q support is not complete because its problematic, use {'active': True} in your limit_to in the mean time
Thanks for the { } tips. I remove Q() from all my models, but I still got this error.
There is a problem in the process_m2m method: line 233, the code is: auto_created_through_model = through._meta.auto_created but correct code would be: auto_created_through_model = getattr(getattr(through, '_meta', None), 'auto_created', False)