forked from frappe/erpnext
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Move thumbnail updation to different patch
- Thumbnail updation handled via different patch - create_website_items will only have one purpose - added progress bar to `create_website_items` - code cleanup
- Loading branch information
1 parent
ac8014e
commit 348a961
Showing
3 changed files
with
43 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import frappe | ||
|
||
|
||
def execute(): | ||
if frappe.db.has_column("Item", "thumbnail"): | ||
website_item = frappe.qb.DocType("Website Item").as_("wi") | ||
item = frappe.qb.DocType("Item") | ||
|
||
frappe.qb.update(website_item).inner_join(item).on( | ||
website_item.item_code == item.item_code | ||
).set( | ||
website_item.thumbnail, item.thumbnail | ||
).where( | ||
website_item.website_image.notnull() | ||
& website_item.thumbnail.isnull() | ||
).run() |