fix: travis failing (#19568)
This commit is contained in:
parent
732d6afad5
commit
94565d69d1
@ -14,10 +14,14 @@ class CurrencyExchange(Document):
|
||||
purpose = ""
|
||||
if not self.date:
|
||||
self.date = nowdate()
|
||||
|
||||
# If both selling and buying enabled
|
||||
purpose = "Selling-Buying"
|
||||
if cint(self.for_buying)==0 and cint(self.for_selling)==1:
|
||||
purpose = "Selling"
|
||||
if cint(self.for_buying)==1 and cint(self.for_selling)==0:
|
||||
purpose = "Buying"
|
||||
|
||||
self.name = '{0}-{1}-{2}{3}'.format(formatdate(get_datetime_str(self.date), "yyyy-MM-dd"),
|
||||
self.from_currency, self.to_currency, ("-" + purpose) if purpose else "")
|
||||
|
||||
|
@ -11,7 +11,9 @@ test_records = frappe.get_test_records('Currency Exchange')
|
||||
|
||||
def save_new_records(test_records):
|
||||
for record in test_records:
|
||||
purpose = str("")
|
||||
# If both selling and buying enabled
|
||||
purpose = "Selling-Buying"
|
||||
|
||||
if cint(record.get("for_buying"))==0 and cint(record.get("for_selling"))==1:
|
||||
purpose = "Selling"
|
||||
if cint(record.get("for_buying"))==1 and cint(record.get("for_selling"))==0:
|
||||
|
Loading…
Reference in New Issue
Block a user