Skip to content

Commit

Permalink
fix date retrieval for synthetic storm creation
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Jun 14, 2022
1 parent 160fe28 commit f18f5f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stormevents/stormevent.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def start_date(self, start_date: datetime):
@lru_cache(maxsize=None)
def __data_start(self) -> datetime:
data_start = self.__entry["start_date"]
if pandas.isna(data_start):
if pandas.isna(data_start) and not self.synthetic:
data_start = VortexTrack.from_storm_name(self.name, self.year).start_date
return data_start

Expand All @@ -263,7 +263,7 @@ def end_date(self, end_date: datetime):
@lru_cache(maxsize=None)
def __data_end(self) -> datetime:
data_end = self.__entry["end_date"]
if pandas.isna(data_end):
if pandas.isna(data_end) and not self.synthetic:
data_end = VortexTrack.from_storm_name(self.name, self.year).end_date
return data_end

Expand Down

0 comments on commit f18f5f8

Please sign in to comment.