Skip to content

Commit

Permalink
Merge pull request #80 from aplazame/bugfix/until-rest-has-valid-values
Browse files Browse the repository at this point in the history
usage_limits doesn't have correct values when init Hubspot3.
  • Loading branch information
jpetrucciani authored Jan 3, 2020
2 parents cbc8a1e + 4076cbe commit 540d11f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hubspot3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def need_update(self):
:see: https://developers.hubspot.com/docs/methods/check-daily-api-usage
"""
five_minutes_ago = datetime.now() - timedelta(minutes=5)
if self.collected_at and self.collected_at > five_minutes_ago:
if self.fetch_status != self.FetchStatus.NONE and self.collected_at > five_minutes_ago:
return False
return True

Expand Down

0 comments on commit 540d11f

Please sign in to comment.