瀏覽代碼

chore: remove stripe patch

version-14
phot0n 2 年之前
父節點
當前提交
4b069374f5
共有 2 個檔案被更改,包括 0 行新增26 行删除
  1. +0
    -1
      frappe/patches.txt
  2. +0
    -25
      frappe/patches/v11_0/sync_stripe_settings_before_migrate.py

+ 0
- 1
frappe/patches.txt 查看文件

@@ -66,7 +66,6 @@ execute:frappe.delete_doc_if_exists('Page', 'user-permissions')
frappe.patches.v10_0.set_no_copy_to_workflow_state
frappe.patches.v10_0.increase_single_table_column_length
frappe.patches.v11_0.create_contact_for_user
frappe.patches.v11_0.sync_stripe_settings_before_migrate
frappe.patches.v11_0.update_list_user_settings
frappe.patches.v11_0.rename_workflow_action_to_workflow_action_master #13-06-2018
frappe.patches.v11_0.rename_email_alert_to_notification #13-06-2018


+ 0
- 25
frappe/patches/v11_0/sync_stripe_settings_before_migrate.py 查看文件

@@ -1,25 +0,0 @@
import frappe
from frappe.utils.password import get_decrypted_password


def execute():
publishable_key = frappe.db.sql(
"select value from tabSingles where doctype='Stripe Settings' and field='publishable_key'"
)
if publishable_key:
secret_key = get_decrypted_password(
"Stripe Settings", "Stripe Settings", fieldname="secret_key", raise_exception=False
)
if secret_key:
frappe.reload_doc("integrations", "doctype", "stripe_settings")
frappe.db.commit()

settings = frappe.new_doc("Stripe Settings")
settings.gateway_name = (
frappe.db.get_value("Global Defaults", None, "default_company") or "Stripe Settings"
)
settings.publishable_key = publishable_key
settings.secret_key = secret_key
settings.save(ignore_permissions=True)

frappe.db.delete("Singles", {"doctype": "Stripe Settings"})

Loading…
取消
儲存