mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
style: bulk format code with black
v13 port because otherwise backports will result in conflicts always
This commit is contained in:
@@ -9,12 +9,14 @@ def set_up_address_templates(default_country=None):
|
||||
is_default = 1 if country == default_country else 0
|
||||
update_address_template(country, html, is_default)
|
||||
|
||||
|
||||
def get_address_templates():
|
||||
"""
|
||||
Return country and path for all HTML files in this directory.
|
||||
|
||||
Returns a list of dicts.
|
||||
"""
|
||||
|
||||
def country(file_name):
|
||||
"""Convert 'united_states.html' to 'United States'."""
|
||||
suffix_pos = file_name.find(".html")
|
||||
@@ -47,9 +49,6 @@ def update_address_template(country, html, is_default=0):
|
||||
frappe.db.set_value("Address Template", country, "template", html)
|
||||
frappe.db.set_value("Address Template", country, "is_default", is_default)
|
||||
else:
|
||||
frappe.get_doc(dict(
|
||||
doctype="Address Template",
|
||||
country=country,
|
||||
is_default=is_default,
|
||||
template=html
|
||||
)).insert()
|
||||
frappe.get_doc(
|
||||
dict(doctype="Address Template", country=country, is_default=is_default, template=html)
|
||||
).insert()
|
||||
|
||||
Reference in New Issue
Block a user