How to remove rows with non unique fields in django by timestamp? : TLDR: How to filter models which have duplicated `hash` field and remove the ones have latest timestamp? 

I'm creating models with `bulk_create` in django. The thing is one field which I want to be `unique=True` can't be set like this due to encryption applied by `fernet_fields` extension to this field. So I came up with a solution to create additional hash field by which I can determine uniqueness of specified model. One more problem is `bulk_create` does not run with SQL `IGNORE` statement and throws `IntegrityError` if there is non unique record to be recorded. At this point I have an idea just leave hash field with `unique=False` setting and remove non unique records which were added latest after `bulk_create` has been called.