-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'CloneMixin' has no attribute '_meta' #58
Comments
Thanks Could you include the traceback of the error you saw ?? Would be really helpful. |
@jackton1 thankyou for your quick response. See the test:
As you can see i used a complete clean database with no migrations. |
When I remove |
Sure, your welcome Can you test using class MyModel(CloneModel): # Won't need to add models.Model
... Also a copy of how the model is setup would be helpful. |
Still the same traceback. My model:
This set-up is not working currently. Only when I remove CloneMixin. |
Oh yeah it's the way you applied the mixin for python they are left -> right Changing to class Assignment(CloneMixin, models.Model):
... Should solve the error. |
@webconexus Please let me know if this solution above solves your issue. |
@jackton1 I tried that already, but I still got the same error. |
@webconexus Sorry I haven't been able to get to this can you confirm the current version you have setup.
|
Any update on this. Getting the same Tried both rearranging Mixin and changing to CloneModel neither worked. |
Ran this here #69 with
Can you verify that the python version used in the virtualenv is correct seems it uses
|
After trying to replicate this the final conclusion seems to be how your migrations are generated to solve this error try regenerating the migrations for the Assignment model. Make sure to delete any of the dependencies specified here dependencies = [
('sample_company', '0001_initial'),
('sample_assignment', '0001_initial'),
('sample_driver', '0001_initial'),
('sample', '0006_assignment'),
]
operations = [
migrations.AddField(
model_name='assignment',
name='applied_drivers',
field=models.ManyToManyField(blank=True, related_name='driver_applications', to='sample_driver.Driver', verbose_name='Driver applications'),
), before running the migration. |
#71 Shows an example setup to replicate the issue creating a new release. |
Hi,
I am using your package, very usefull! However I get this error after resetting my database and trying to make migrations. Any ideas what is causing this error?
When I already had the model in my database and then added CloneMixin to my model it was working. But with an empty database the make migrations is not working.
The text was updated successfully, but these errors were encountered: