TAXIIProject / django-taxii-services

Installable taxii_services
http://taxiiproject.github.io/
BSD 3-Clause "New" or "Revised" License
20 stars 13 forks source link

Update_content_binding and update_content_binding_subtype appear to make loaddata fail #25

Open MarkDavidson opened 10 years ago

MarkDavidson commented 10 years ago

Currently, I'm having a hard time doing something like: python manage.py dumpdata taxii_services > data.json then python manage.py loaddata data.json because I get the following error: Could not load taxii_services.ContentBindingSubtype(pk=1): columns content_binding_id, subtype_id are not unique

I'm thinking the root cause might be because the post_save hooks for ContentBinding and ContentBindingSubtype do not properly account for the fact that the ContentBindingAndSubtype might already exist.

MarkDavidson commented 10 years ago

... and now I'm having trouble replicating the issue.

I'm thinking that changing the functions to use get_or_create would remediate the issue. However, I can't replicate the issue so I'm not going to fix it right now.