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(WebForm): Replace get_cached_value with get_value #23302

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

cogk
Copy link
Contributor

@cogk cogk commented Nov 20, 2023

I believe that frappe.get_cached_value (values cached in Redis) does not support filters, so revert back to get_value (queries the DB, optional in-memory/request cache).

frappe/frappe/__init__.py

Lines 1183 to 1185 in d715b0a

def get_cached_value(
doctype: str, name: str, fieldname: str = "name", as_dict: bool = False
) -> Any:

This might mean that unit tests are not covering this case (DocType without show_title_field_in_link).

#23270 ⋅ no-docs

@cogk cogk requested review from a team and ankush and removed request for a team November 20, 2023 11:09
@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label Nov 20, 2023
frappe.get_cached_value does not support filters
@cogk cogk force-pushed the fix-webform-get-cached-value branch from 4ef639d to 8b03a48 Compare November 20, 2023 11:14
@ankush ankush removed the add-test-cases Add test case to validate fix or enhancement label Nov 20, 2023
@ankush ankush merged commit 49a0f75 into frappe:develop Nov 20, 2023
20 of 21 checks passed
@ankush ankush added the backport version-15-hotfix Backport the PR to v15 label Nov 20, 2023
ankush added a commit that referenced this pull request Nov 20, 2023
…-23302

fix(WebForm): Replace `get_cached_value` with `get_value` (backport #23302)
@git-avc
Copy link
Contributor

git-avc commented Nov 20, 2023

Closes #23284

@akhilnarang akhilnarang added the backport version-14-hotfix backport to version 14 label Nov 22, 2023
akhilnarang added a commit that referenced this pull request Nov 22, 2023
…-23302

fix(WebForm): Replace `get_cached_value` with `get_value` (backport #23302)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 backport version-15-hotfix Backport the PR to v15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants