Merge pull request #17297 from netchampfaris/index-item-route

fix: Add index to Item route
This commit is contained in:
Nabin Hait 2019-04-19 20:11:29 +05:30 committed by GitHub
commit a6e09826b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1062,3 +1062,7 @@ def update_variants(variants, template, publish_progress=True):
count+=1
if publish_progress:
frappe.publish_progress(count*100/len(variants), title = _("Updating Variants..."))
def on_doctype_update():
# since route is a Text column, it needs a length for indexing
frappe.db.add_index("Item", ["route(500)"])