fix: Ignore mandatory fields if exist (#27871)

The goal of this fix is to not break the patch in case of customizations
In this particular case, it's regarding a customized Note DocType with
multiple custom mandatory fields
This commit is contained in:
gavin 2021-10-08 15:10:03 +05:30 committed by Ankush Menat
parent bd3b47fd50
commit 7eb9dc01f8

View File

@ -26,4 +26,4 @@ def notify_users():
note.public = 1
note.notify_on_login = 1
note.content = """<div class="ql-editor read-mode"><p>You are seeing this message because Shopping Cart is enabled on your site. </p><p><br></p><p>Shopping Cart Settings and Products settings are now merged into "E Commerce Settings". </p><p><br></p><p>You can learn about new and improved E-Commerce features in the official documentation.</p><ol><li data-list="bullet"><span class="ql-ui" contenteditable="false"></span><a href="https://docs.erpnext.com/docs/v13/user/manual/en/e_commerce/set_up_e_commerce" rel="noopener noreferrer">https://docs.erpnext.com/docs/v13/user/manual/en/e_commerce/set_up_e_commerce</a></li></ol><p><br></p></div>"""
note.save()
note.insert(ignore_mandatory=True)