Skip to content

Commit

Permalink
fix: fixed an issue with LastUpdatedAt cache refresh (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
TeKrop authored Aug 27, 2024
1 parent 9325b4f commit 875d506
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/commands/check_and_update_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
from app.parsers.player_parser import PlayerParser
from app.parsers.player_stats_summary_parser import PlayerStatsSummaryParser
from app.parsers.roles_parser import RolesParser
from app.parsers.search_data_parser import NamecardParser
from app.parsers.search_data_parser import LastUpdatedAtParser, NamecardParser

# Mapping of parser class names to linked classes
PARSER_CLASSES_MAPPING = {
"GamemodesParser": GamemodesParser,
"HeroParser": HeroParser,
"HeroesParser": HeroesParser,
"HeroesStatsParser": HeroesStatsParser,
"LastUpdatedAtParser": LastUpdatedAtParser,
"MapsParser": MapsParser,
"NamecardParser": NamecardParser,
"PlayerParser": PlayerParser,
Expand Down Expand Up @@ -70,7 +71,7 @@ def get_request_parser_class(cache_key: str) -> tuple[type, dict]:
cache_kwargs["locale"] = uri[1]
if "Player" in parser_class_name:
cache_kwargs["player_id"] = uri[3]
elif parser_class_name == "NamecardParser":
elif parser_class_name in ("LastUpdatedAtParser", "NamecardParser"):
cache_kwargs["player_id"] = uri[4].replace("#", "-")
elif parser_class_name == "HeroParser":
cache_kwargs["hero_key"] = uri[3]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "overfast-api"
version = "2.35.0"
version = "2.35.1"
description = "Overwatch API giving data about heroes, maps, and players statistics."
license = {file = "LICENSE"}
authors = [
Expand Down

0 comments on commit 875d506

Please sign in to comment.