No description
Find a file
Gavin D'souza 36fa2122a3 fix: Patch qb for different schemas in same process
You would want to switch schemas in the same process. Eversince the
change
64e5273764
we stopped patching on every frappe.init call which meant, if a MariaDB
site was initialized first, frappe._qb_patched would be set to True and
if a Postgres site was initialized after, _qb_patched would be lying as
the PG engine isn't patched yet. Sooooo we need a Dict instead to
maintain this record of patching. This issue caused weird errors lol -

Traceback:

  File "/home/frappe/Desktop/frappe-bench-dev/env/lib/python3.10/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/commands/__init__.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/commands/site.py", line 524, in migrate
    SiteMigration(
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/migrate.py", line 169, in run
    self.setUp()
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/migrate.py", line 73, in setUp
    clear_global_cache()
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/cache_manager.py", line 102, in clear_global_cache
    clear_website_cache()
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/website/utils.py", line 374, in clear_website_cache
    clear_cache(path)
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/website/utils.py", line 369, in clear_cache
    for method in frappe.get_hooks("website_clear_cache"):
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/__init__.py", line 1440, in get_hooks
    hooks = _dict(_load_app_hooks())
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/utils/caching.py", line 57, in wrapper
    return_val = func(*args, **kwargs)
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/__init__.py", line 1407, in _load_app_hooks
    apps = [app_name] if app_name else get_installed_apps(sort=True)
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/utils/caching.py", line 57, in wrapper
    return_val = func(*args, **kwargs)
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/__init__.py", line 1374, in get_installed_apps
    installed = json.loads(db.get_global("installed_apps") or "[]")
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/database/database.py", line 917, in get_global
    return self.get_default(key, user)
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/database/database.py", line 921, in get_default
    d = self.get_defaults(key, parent)
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/database/database.py", line 938, in get_defaults
    defaults = frappe.defaults.get_defaults(parent)
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/defaults.py", line 88, in get_defaults
    globald = get_defaults_for()
  File "/home/frappe/Desktop/frappe-bench-dev/apps/frappe/frappe/defaults.py", line 218, in get_defaults_for
    frappe.qb.from_(table)
TypeError: 'Field' object is not callable
2022-06-15 15:55:43 +05:30
.github ci: Run tests bypassing roulette with labels "Run UI Tests", "Run Server Tests" 2022-06-13 19:38:30 +05:30
cypress fix: Update label for editing in full page and add custom logic for rendering it. (#17149) 2022-06-13 16:41:43 +05:30
esbuild chore: set esbuild output target to es2017 2022-04-01 21:30:42 +05:30
frappe fix: Patch qb for different schemas in same process 2022-06-15 15:55:43 +05:30
.editorconfig chore: extend editorconfig to vue components 2021-08-25 20:12:55 +05:30
.eslintignore fix: Miscellaneous changes (#12343) 2021-02-08 12:05:37 +05:30
.eslintrc chore: eslint - use es2020 for parsing 2022-04-18 15:06:23 +05:30
.flake8 ci: fix semgrep false positives (#13161) 2021-05-12 20:22:48 +05:30
.git-blame-ignore-revs chore: Ignore codebase formatting change in blame 2022-04-12 11:30:28 +05:30
.gitignore chore: VS2022 uses .vs instead of .vscode. Add .vs to .gitignore. 2021-12-13 11:16:11 +11:00
.mergify.yml chore: Add mergify[bot] to exception list 2022-06-13 12:03:39 +05:30
.pre-commit-config.yaml refactor: Clean up setup file 2022-05-21 08:27:04 +05:30
.pylintrc reactor(scheduler): created "Scheduler Job Type" and cleaned up scheduler 2019-11-07 12:14:09 +05:30
.releaserc chore: fix semantic release config 2022-06-02 12:06:37 +05:30
.snyk [Snyk] Fix for 1 vulnerabilities (#11523) 2020-09-17 10:00:48 +05:30
.stylelintrc fix: Miscellaneous changes (#12343) 2021-02-08 12:05:37 +05:30
attributions.md Non Pour Accent! (#5427) 2018-04-10 22:53:42 -08:00
bandit.yml fix(tests): tests and linting 2019-02-13 16:50:34 +05:30
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2017-09-12 09:14:34 +05:30
codecov.yml refactor: Clean up whitespace & add CI check 2022-02-25 20:01:29 +05:30
CODEOWNERS chore: Update CODEOWNERS 2022-04-01 15:00:57 +05:30
cypress.json chore: colocate ui tests 2022-01-03 16:19:11 +05:30
dev-requirements.txt chore(deps): bump faker from 8.1.4 to 13.12.1 2022-06-10 11:31:59 +05:30
generate_bootstrap_theme.js fix: Common sass_options 2021-04-27 11:24:19 +05:30
hooks.md chore!: remove dead hooks app_icon & app_color 2022-05-10 14:41:01 +05:30
LICENSE chore: Update copyright until date to 2021 2021-09-03 12:19:15 +05:30
Makefile [NEW] Makefile to clean cache without restart 2018-03-08 15:18:32 +05:30
node_utils.js fix: set correct default redis async broker in node_utils 2021-05-21 16:09:43 +05:30
package.json fix: added text editor dialog on hide action (#17117) 2022-06-09 14:33:08 +05:30
pyproject.toml style: format all python files using black (#16453) 2022-04-12 10:59:25 +05:30
README.md style(README): Fixed inconsistent whitespaces 2022-04-28 14:52:42 +05:30
requirements.txt chore(deps): Bump Pillow from 9.0.1 to 9.1.1 2022-06-10 13:12:35 +05:30
SECURITY.md chore: updated Security policy and issue template 2019-10-12 12:06:36 +05:30
setup.py chore: Remove deprecated dependency_links from setup 2022-06-10 11:36:05 +05:30
sider.yml chore(sider): add sider default config for flake8 + ignore tab errors (W191) (#12587) 2021-03-16 17:07:41 +05:30
socketio.js fix: publish realtime to work with localhost (backport #14174) (#14196) 2021-09-14 12:09:01 +05:30
yarn.lock fix: added text editor dialog on hide action (#17117) 2022-06-09 14:33:08 +05:30


a web framework with "batteries included"

it's pronounced - fra-pay

Full-stack web application framework that uses Python and MariaDB on the server side and a tightly integrated client side library. Built for ERPNext

Login for the PWD site: (username: Administrator, password: admin)

Table of Contents

Installation

Contributing

  1. Code of Conduct
  2. Contribution Guidelines
  3. Security Policy
  4. Translations

Resources

  1. frappeframework.com - Official documentation of the Frappe Framework.
  2. frappe.school - Pick from the various courses by the maintainers or from the community.

License

This repository has been released under the MIT License.