machine_name and created_by id is unique together, different users can define the same name. Since the unique constraint exception is not handled by django, I will have to resolve it in code