def create_root_trust(Trust, pk, settlor, title): kwargs = {'id': pk, 'title': title} if settlor is not None: kwargs.update({'settlor_id': settlor}) trust = Trust(**kwargs) trust.trust = trust trust.save()