Is it possible to simplify this:
def method(self, **kwargs):
if kwargs.get('profile_id') is None:
kwargs['profile_id'] = 'something1'
if kwargs.get('status') is None:
kwargs['status'] = 'something2'
if kwargs.get('account_type') is None:
kwargs['account_type'] = 'something3'
if kwargs.get('external_account_id') is None:
kwargs['external_account_id'] = 'something4'
if kwargs.get('vendor') is None:
kwargs['vendor'] = 'something5'
if kwargs.get('created_timestamp') is None:
kwargs['created_timestamp'] = 'something6'
return ClassOne.objects.create(**kwargs)
This works, but I'm just curious if there is something more elegant. I was thinking about doing something like this:
kwargs['profile_id'] = kwargs.get('profile_id') or 'something1'