# -*- coding: utf-8 -*- #!/usr/bin/env python """ """ from apps.web.core.models import BankCard from apps.web.dealer.models import Merchant from script.base import * merchants = Merchant.objects() for merchant in merchants: payload = { 'ownerId': merchant.ownerId, 'cardType': merchant.cardType, 'bankName': merchant.parentBankName, 'cardNo': merchant.accountCode, 'holderName': merchant.merchantName, 'branchName': merchant.subBankName } BankCard(**payload).save()