Ver a proveniência

Revert "[fix] Disabled document not validated on save/submit #10571" (#4240)

* Revert "Force uploads to be private by default (#4159)"

This reverts commit 2191a7d3a4.

* Revert "[fix] Disabled document not validated on save/submit #10571 (#4195)"

This reverts commit 13a3205277.
version-14
Rushabh Mehta há 7 anos
committed by GitHub
ascendente
cometimento
550acb5e1c
1 ficheiros alterados com 2 adições e 9 eliminações
  1. +2
    -9
      frappe/desk/form/utils.py

+ 2
- 9
frappe/desk/form/utils.py Ver ficheiro

@@ -29,15 +29,8 @@ def validate_link():
frappe.response['message'] = 'Ok'
return

#if enabled/disabled field is present
condition = ""
if frappe.get_meta(options).get_field('disabled'):
condition = " and `disabled` = 0"
elif frappe.get_meta(options).get_field('enabled'):
condition = " and `enabled` = 1"

valid_value = frappe.db.sql("select name from `tab{0}` where name=%s {1}".format(frappe.db.escape(options),
condition), (value,))
valid_value = frappe.db.sql("select name from `tab%s` where name=%s" % (frappe.db.escape(options),
'%s'), (value,))

if valid_value:
valid_value = valid_value[0][0]


Carregando…
Cancelar
Guardar