Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] pass company filter as string in get_value #8823

Merged
merged 1 commit into from
May 16, 2017

Conversation

saurabh6790
Copy link
Member

@saurabh6790 saurabh6790 commented May 15, 2017

bench --site aaaa.erpnext.com execute frappe.utils.get_site_info
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/frappe/benches/bench-2017-05-11/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/frappe/benches/bench-2017-05-11/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/benches/bench-2017-05-11/env/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/benches/bench-2017-05-11/env/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/frappe/benches/bench-2017-05-11/env/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/benches/bench-2017-05-11/env/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/benches/bench-2017-05-11/env/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/benches/bench-2017-05-11/env/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/benches/bench-2017-05-11/env/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/benches/bench-2017-05-11/apps/frappe/frappe/commands/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/benches/bench-2017-05-11/apps/frappe/frappe/commands/utils.py", line 113, in execute
    ret = frappe.get_attr(method)(*args, **kwargs)
  File "/home/frappe/benches/bench-2017-05-11/apps/frappe/frappe/utils/__init__.py", line 513, in get_site_info
    site_info.update(frappe.get_attr(method_name)(site_info) or {})
  File "/home/frappe/benches/bench-2017-05-11/apps/erpnext/erpnext/utilities/__init__.py", line 29, in get_site_info
    domain = frappe.db.get_value('Company', company, 'domain')
  File "/home/frappe/benches/bench-2017-05-11/apps/frappe/frappe/database.py", line 413, in get_value
    order_by, cache=cache)
  File "/home/frappe/benches/bench-2017-05-11/apps/frappe/frappe/database.py", line 457, in get_values
    out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
  File "/home/frappe/benches/bench-2017-05-11/apps/frappe/frappe/database.py", line 583, in _get_values_from_table
    conditions, values = self.build_conditions(filters)
  File "/home/frappe/benches/bench-2017-05-11/apps/frappe/frappe/database.py", line 376, in build_conditions
    for f in filters:
TypeError: 'int' object is not iterable

@nabinhait nabinhait merged commit f4ee682 into frappe:develop May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants