Merge pull request #14038 from shariquerik/wspace-patch-fix

patch: set title as label if extends is empty
This commit is contained in:
Faris Ansari 2021-08-25 13:05:08 +05:30 committed by GitHub
commit ebfe4c2fd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -182,4 +182,4 @@ frappe.patches.v13_0.jinja_hook
frappe.patches.v13_0.update_notification_channel_if_empty
frappe.patches.v14_0.drop_data_import_legacy
frappe.patches.v14_0.rename_cancelled_documents
frappe.patches.v14_0.update_workspace2
frappe.patches.v14_0.update_workspace2 # 25.08.2021

View file

@ -50,11 +50,11 @@ def create_content(doc):
return content
def update_wspace(doc, seq, content):
if not doc.is_standard and not doc.public:
if not doc.title and not doc.content and not doc.is_standard and not doc.public:
doc.sequence_id = seq + 1
doc.content = json.dumps(content)
doc.public = 0
doc.title = doc.extends
doc.title = doc.extends or doc.label
doc.extends = ''
doc.category = ''
doc.onboarding = ''