Browse Source

[wsgi] [minor] fixed webnotes.local.form_dict

version-14
Rushabh Mehta 11 years ago
parent
commit
ad9638d5b3
5 changed files with 8 additions and 8 deletions
  1. +1
    -1
      core/doctype/communication/communication.py
  2. +1
    -1
      core/page/todo/todo.py
  3. +3
    -3
      webnotes/widgets/form/assign_to.py
  4. +1
    -1
      webnotes/widgets/reportview.py
  5. +2
    -2
      webnotes/widgets/tags.py

+ 1
- 1
core/doctype/communication/communication.py View File

@@ -70,7 +70,7 @@ def get_customer_supplier(args=None):
Get Customer/Supplier, given a contact, if a unique match exists
"""
import webnotes
if not args: args = webnotes.form_dict
if not args: args = webnotes.local.form_dict
if not args.get('contact'):
raise Exception, "Please specify a contact to fetch Customer/Supplier"
result = webnotes.conn.sql("""\


+ 1
- 1
core/page/todo/todo.py View File

@@ -17,7 +17,7 @@ def get(arg=None):
@webnotes.whitelist()
def edit(arg=None):
import markdown2
args = webnotes.form_dict
args = webnotes.local.form_dict

d = Document('ToDo', args.get('name') or None)
d.description = args['description']


+ 3
- 3
webnotes/widgets/form/assign_to.py View File

@@ -10,7 +10,7 @@ import webnotes
def get(args=None):
"""get assigned to"""
if not args:
args = webnotes.form_dict
args = webnotes.local.form_dict
return webnotes.conn.sql_list("""select owner from `tabToDo`
where reference_type=%(doctype)s and reference_name=%(name)s
order by modified desc limit 5""", args)
@@ -19,8 +19,8 @@ def get(args=None):
def add(args=None):
"""add in someone's to do list"""
if not args:
args = webnotes.form_dict
args = webnotes.local.form_dict
if webnotes.conn.sql("""select owner from `tabToDo`
where reference_type=%(doctype)s and reference_name=%(name)s
and owner=%(assign_to)s""", args):


+ 1
- 1
webnotes/widgets/reportview.py View File

@@ -257,7 +257,7 @@ def save_report():
"""save report"""
from webnotes.model.doc import Document
data = webnotes.form_dict
data = webnotes.local.form_dict
if webnotes.conn.exists('Report', data['name']):
d = Document('Report', data['name'])
else:


+ 2
- 2
webnotes/widgets/tags.py View File

@@ -39,7 +39,7 @@ def check_user_tags(dt):
def add_tag():
"adds a new tag to a record, and creates the Tag master"
f = webnotes.form_dict
f = webnotes.local.form_dict
tag, color = f.get('tag'), f.get('color')
dt, dn = f.get('dt'), f.get('dn')
@@ -50,7 +50,7 @@ def add_tag():
@webnotes.whitelist()
def remove_tag():
"removes tag from the record"
f = webnotes.form_dict
f = webnotes.local.form_dict
tag, dt, dn = f.get('tag'), f.get('dt'), f.get('dn')
DocTags(dt).remove(dn, tag)


Loading…
Cancel
Save