2
I think Django’s update_or_create
can be used here:
merchant = Merchant.objects.get(user=request.user)
ext_merchant, created = MerchantExtended.objects.update_or_create(
merchant=merchant, defaults={'billing_address': '123 Main St'}
)
Source:stackexchange.com