Revert back condition for open_since in Trade.__repr__

This commit is contained in:
hroff-1902 2019-09-13 23:00:09 +03:00
parent c8d191a5c9
commit eda1ec652f

View File

@ -210,7 +210,7 @@ class Trade(_DECL_BASE):
ticker_interval = Column(Integer, nullable=True)
def __repr__(self):
open_since = self.open_date.strftime('%Y-%m-%d %H:%M:%S') if self.open_date else 'closed'
open_since = self.open_date.strftime('%Y-%m-%d %H:%M:%S') if self.is_open else 'closed'
return (f'Trade(id={self.id}, pair={self.pair}, amount={self.amount:.8f}, '
f'open_rate={self.open_rate:.8f}, open_since={open_since})')