Skip to content

Commit

Permalink
Fix get_publish_time_from_object
Browse files Browse the repository at this point in the history
  • Loading branch information
mberk committed Jan 10, 2023
1 parent e7b9997 commit 74cf63d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion betfairutil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2624,7 +2624,8 @@ def create_race_change_generator_from_race_file(


def get_publish_time_from_object(o: Union[Dict[str, Any], MarketBook]) -> int:
return getattr(o, "_data", o).get("publishTime", o.get("pt"))
_data = getattr(o, "_data", o)
return _data.get("publishTime", _data.get("pt"))


def create_combined_market_book_and_race_change_generator(
Expand Down

0 comments on commit 74cf63d

Please sign in to comment.