diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py index 01125f997bd..0032e80f1e8 100644 --- a/erpnext/utilities/transaction_base.py +++ b/erpnext/utilities/transaction_base.py @@ -26,7 +26,7 @@ class TransactionBase(StatusUpdater): now = now_datetime() self.posting_date = now.strftime('%Y-%m-%d') self.posting_time = now.strftime('%H:%M:%S.%f') - else: + elif self.posting_time: try: get_time(self.posting_time) except ValueError: