From 203f45775f81077fbf6d38ee248939da3d43420c Mon Sep 17 00:00:00 2001 From: Mahdi Sadeghi Date: Fri, 20 Nov 2020 22:31:44 +0330 Subject: [PATCH] watch bugfix --- lib/tsetmc_api/__init__.py | 2 +- lib/tsetmc_api/watch.py | 10 ++++++---- setup.py | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/tsetmc_api/__init__.py b/lib/tsetmc_api/__init__.py index ac6d8f4..0c30ec7 100644 --- a/lib/tsetmc_api/__init__.py +++ b/lib/tsetmc_api/__init__.py @@ -3,4 +3,4 @@ from .watch import Watch, Filter, AtiFilter, SahamFilter, WatchTick, SandoghFilter, KalaForoushFilter, \ EkhtiarForoushFilter, HaghTaghaddomFilter, OraghMosharekatFilter, PayeFarabourseFilter -__version__ = '3.0.4' +__version__ = '3.0.5' diff --git a/lib/tsetmc_api/watch.py b/lib/tsetmc_api/watch.py index 669fb76..9b85a72 100644 --- a/lib/tsetmc_api/watch.py +++ b/lib/tsetmc_api/watch.py @@ -153,11 +153,13 @@ def start_watch(self): self.step_watch() def _publish(self): - if self._last_historical_data is None: - return + if self._historical_data: + if self._last_historical_data is None: + return - if self._last_stats_data is None: - return + if self._stats_data: + if self._last_stats_data is None: + return if self._last_price_data is None: return diff --git a/setup.py b/setup.py index 75971a7..9d0af1e 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="tsetmc-api", - version="3.0.4", + version="3.0.5", install_requires=[ "beautifulsoup4==4.9.3", "certifi==2020.11.8",