vvangelovski / django-audit-log

Audit log for your Django models
Other
232 stars 94 forks source link

How to supress IntegrityError while loading data from fixture #32

Closed vaibhav-jain closed 8 years ago

vaibhav-jain commented 8 years ago

Can you please tell me how can I suppress IntegrityError

django.db.utils.IntegrityError: Problem installing fixtures: The row in table 'girvi_itemauditlogentry' with 

primary key '6372' has an invalid foreign key: girvi_itemauditlogentry.packet_id contains a value '2958' 

that does not have a corresponding value in girvi_packet.id.
vaibhav-jain commented 8 years ago

I solved this by writing a script to first delete audit_log entries with missing parents and then it worked.