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 Jul 5, 2022
1 parent 0759960 commit 0875079
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 @@ -244,7 +244,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 @@ -269,7 +269,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 0875079

Please sign in to comment.