refactor: Rename assertEquals to assertEqual to avoid deprecation warnings
This commit is contained in:
parent
a70e11450e
commit
19c5fd72d6
@ -152,7 +152,7 @@ class PricingRule(Document):
|
||||
frappe.throw(_("Valid from date must be less than valid upto date"))
|
||||
|
||||
def validate_condition(self):
|
||||
if self.condition and ("=" in self.condition) and re.match("""[\w\.:_]+\s*={1}\s*[\w\.@'"]+""", self.condition):
|
||||
if self.condition and ("=" in self.condition) and re.match(r'[\w\.:_]+\s*={1}\s*[\w\.@\'"]+', self.condition):
|
||||
frappe.throw(_("Invalid condition expression"))
|
||||
|
||||
#--------------------------------------------------------------------------------
|
||||
|
@ -500,7 +500,7 @@ def download_ewb_json():
|
||||
|
||||
if not isinstance(docname, list):
|
||||
# removes characters not allowed in a filename (https://stackoverflow.com/a/38766141/4767738)
|
||||
filename_prefix = re.sub('[^\w_.)( -]', '', docname)
|
||||
filename_prefix = re.sub(r'[^\w_.)( -]', '', docname)
|
||||
|
||||
frappe.local.response.filename = '{0}_e-WayBill_Data_{1}.json'.format(filename_prefix, frappe.utils.random_string(5))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user