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: make rename_doc work pre_model_sync #26419

Merged
merged 1 commit into from
May 13, 2024

Conversation

barredterra
Copy link
Collaborator

@barredterra barredterra commented May 12, 2024

While migrating older sites, DocType.is_virtual is not available [pre_model_sync].

rename_doc is used in patches, which can then break migrations.

This PR makes rename_doc work without is_virtual, by making these parts of the code dependent on this column being available.

@barredterra barredterra requested review from a team and ankush and removed request for a team May 12, 2024 22:03
@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label May 12, 2024
@barredterra barredterra added backport version-15-hotfix Backport the PR to v15 and removed add-test-cases Add test case to validate fix or enhancement labels May 12, 2024
@Markus-Lobedann
Copy link

Please also backport this to version-14 as we are having the exact same problem migrating from 13 to 14 right now.

Copy link
Member

@ankush ankush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should at some point auto-reload DocType before migrate ig.

execute:frappe.reload_doc('core', 'doctype', 'doctype_action', force=True) #2019-09-23
execute:frappe.reload_doc('core', 'doctype', 'doctype_link', force=True) #2020-10-17
execute:frappe.reload_doc('core', 'doctype', 'doctype_state', force=True) #2021-12-15
execute:frappe.reload_doc('core', 'doctype', 'doctype', force=True) #2017-09-22
execute:frappe.reload_doc('core', 'doctype', 'docfield', force=True) #2018-02-20

@ankush ankush merged commit da74008 into frappe:develop May 13, 2024
24 checks passed
@ankush ankush added the backport version-14-hotfix backport to version 14 label May 13, 2024
mergify bot pushed a commit that referenced this pull request May 13, 2024
mergify bot pushed a commit that referenced this pull request May 13, 2024
ankush added a commit that referenced this pull request May 13, 2024
…-26419

fix: make rename_doc work pre_model_sync (backport #26419)
ankush added a commit that referenced this pull request May 13, 2024
…-26419

fix: make rename_doc work pre_model_sync (backport #26419)
@barredterra barredterra deleted the rename_doc-pre_model_sync branch May 13, 2024 10:02
frappe-pr-bot pushed a commit that referenced this pull request May 14, 2024
## [14.74.1](v14.74.0...v14.74.1) (2024-05-14)

### Bug Fixes

* allow navigating to `Table MultiSelect` fields using tab ([1e5faff](1e5faff))
* **document_follow:** `following` was treated as a string not a boolean ([bdc48ad](bdc48ad))
* german translations ([#26370](#26370)) ([167e4e6](167e4e6))
* Increase folder link field size ([#26381](#26381)) ([#26383](#26383)) ([30db235](30db235))
* **integrations:** add back `response.raise_for_status()` ([dcf191c](dcf191c))
* make rename_doc work pre_model_sync ([#26419](#26419)) ([0d631ce](0d631ce))
frappe-pr-bot pushed a commit that referenced this pull request May 14, 2024
# [15.27.0](v15.26.0...v15.27.0) (2024-05-14)

### Bug Fixes

* allow navigating to `Table MultiSelect` fields using tab ([496ae05](496ae05))
* cache github release data per bench (backport [#26382](#26382)) ([#26387](#26387)) ([6e8ef85](6e8ef85))
* **document_follow:** `following` was treated as a string not a boolean ([e0ecfc6](e0ecfc6))
* Increase folder link field size ([#26381](#26381)) ([#26384](#26384)) ([52c335c](52c335c))
* **integrations:** add back `response.raise_for_status()` ([13182e4](13182e4))
* make rename_doc work pre_model_sync ([#26419](#26419)) ([2db51ea](2db51ea))
* pass user and shared params when checking for cache keys ([#26402](#26402)) ([#26404](#26404)) ([a0eb7c1](a0eb7c1))

### Features

* functionality to assign users by user group ([#26044](#26044)) ([#26432](#26432)) ([c308931](c308931))

### Performance Improvements

* Don't update session in cache after every request ([#26308](#26308)) ([#26362](#26362)) ([c0ba12c](c0ba12c))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2024
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

3 participants