Kaynağa Gözat

Merge branch 'develop' into wspace-new-design

version-14
Shariq Ansari 3 yıl önce
committed by GitHub
ebeveyn
işleme
86e9050ae6
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: 4AEE18F83AFDEB23
3 değiştirilmiş dosya ile 20 ekleme ve 0 silme
  1. +2
    -0
      frappe/model/document.py
  2. +1
    -0
      frappe/patches.txt
  3. +17
    -0
      frappe/patches/v13_0/remove_invalid_options_for_data_fields.py

+ 2
- 0
frappe/model/document.py Dosyayı Görüntüle

@@ -188,6 +188,8 @@ class Document(BaseDocument):
is not set. is not set.


:param permtype: one of `read`, `write`, `submit`, `cancel`, `delete`""" :param permtype: one of `read`, `write`, `submit`, `cancel`, `delete`"""
import frappe.permissions

if self.flags.ignore_permissions: if self.flags.ignore_permissions:
return True return True
return frappe.permissions.has_permission(self.doctype, permtype, self, verbose=verbose) return frappe.permissions.has_permission(self.doctype, permtype, self, verbose=verbose)


+ 1
- 0
frappe/patches.txt Dosyayı Görüntüle

@@ -123,6 +123,7 @@ frappe.patches.v12_0.remove_parent_and_parenttype_from_print_formats
frappe.patches.v12_0.remove_example_email_thread_notify frappe.patches.v12_0.remove_example_email_thread_notify
execute:from frappe.desk.page.setup_wizard.install_fixtures import update_genders;update_genders() execute:from frappe.desk.page.setup_wizard.install_fixtures import update_genders;update_genders()
frappe.patches.v12_0.set_correct_url_in_files frappe.patches.v12_0.set_correct_url_in_files
frappe.patches.v13_0.remove_invalid_options_for_data_fields
frappe.patches.v13_0.website_theme_custom_scss frappe.patches.v13_0.website_theme_custom_scss
frappe.patches.v13_0.make_user_type frappe.patches.v13_0.make_user_type
frappe.patches.v13_0.set_existing_dashboard_charts_as_public frappe.patches.v13_0.set_existing_dashboard_charts_as_public


+ 17
- 0
frappe/patches/v13_0/remove_invalid_options_for_data_fields.py Dosyayı Görüntüle

@@ -0,0 +1,17 @@
# Copyright (c) 2022, Frappe and Contributors
# License: MIT. See LICENSE


import frappe
from frappe.model import data_field_options


def execute():
custom_field = frappe.qb.DocType('Custom Field')
(frappe.qb
.update(custom_field)
.set(custom_field.options, None)
.where(
(custom_field.fieldtype == "Data")
& (custom_field.options.notin(data_field_options)))
).run()

Yükleniyor…
İptal
Kaydet