Merge branch 'v4.x.x'
diff --git a/erpnext/__version__.py b/erpnext/__version__.py
index 44a6b21..c41adc0 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
 from __future__ import unicode_literals
-__version__ = '4.25.0'
+__version__ = '4.25.1'
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 0896777..7f3d002 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -5,7 +5,7 @@
 app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
 app_icon = "icon-th"
 app_color = "#e74c3c"
-app_version = "4.25.0"
+app_version = "4.25.1"
 
 error_report_email = "support@erpnext.com"
 
diff --git a/erpnext/patches/v4_2/delete_gl_entries_for_cancelled_invoices.py b/erpnext/patches/v4_2/delete_gl_entries_for_cancelled_invoices.py
index 0e7796a..169b1e2 100644
--- a/erpnext/patches/v4_2/delete_gl_entries_for_cancelled_invoices.py
+++ b/erpnext/patches/v4_2/delete_gl_entries_for_cancelled_invoices.py
@@ -8,6 +8,7 @@
 	cancelled_invoices = frappe.db.sql_list("""select name from `tabSales Invoice` 
 		where docstatus = 2 and ifnull(update_stock, 0) = 1""")
 
-	frappe.db.sql("""delete from `tabGL Entry` 
-		where voucher_type = 'Sales Invoice' and voucher_no in (%s)""" 
-		% (', '.join(['%s']*len(cancelled_invoices))), tuple(cancelled_invoices))
\ No newline at end of file
+	if cancelled_invoices:
+		frappe.db.sql("""delete from `tabGL Entry` 
+			where voucher_type = 'Sales Invoice' and voucher_no in (%s)""" 
+			% (', '.join(['%s']*len(cancelled_invoices))), tuple(cancelled_invoices))
\ No newline at end of file
diff --git a/setup.py b/setup.py
index ecb2e6e..b12ae36 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 import os
 
-version = "4.25.0"
+version = "4.25.1"
 
 with open("requirements.txt", "r") as f:
 	install_requires = f.readlines()