Merge pull request #4197 from saurabh6790/fixes
[minor][fix] set default fiscal year for holiday list calendar view
diff --git a/erpnext/setup/doctype/email_digest/templates/default.html b/erpnext/setup/doctype/email_digest/templates/default.html
index cf35e46..3aad202 100644
--- a/erpnext/setup/doctype/email_digest/templates/default.html
+++ b/erpnext/setup/doctype/email_digest/templates/default.html
@@ -12,7 +12,7 @@
<h1 style="{{ h1 }}">{{ title }}</h1>
<h4 style="font-weight: normal; color: {{ text_muted }}; margin-top: 7px; font-size: 16px; margin-top: 7px;">
- <p>{% if frequency == "Daily "%}
+ <p>{% if frequency == "Daily" %}
{{ frappe.format_date(future_from_date) }}
{% else %}
{{ frappe.format_date(future_from_date) }} - {{ frappe.format_date(future_to_date) }}
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index faae960..65a4b91 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -86,11 +86,16 @@
self.thumbnail = None
if self.website_image and not self.thumbnail:
- file_doc = frappe.get_doc("File", {
- "file_url": self.website_image,
- "attached_to_doctype": "Item",
- "attached_to_name": self.name
- })
+ file_doc = None
+
+ try:
+ file_doc = frappe.get_doc("File", {
+ "file_url": self.website_image,
+ "attached_to_doctype": "Item",
+ "attached_to_name": self.name
+ })
+ except frappe.DoesNotExistError:
+ pass
# for CSV import
if not file_doc: