Skip to content

Commit

Permalink
'NoneType' object has no attribute 'timestamp'
Browse files Browse the repository at this point in the history
  • Loading branch information
JabLuszko committed Sep 15, 2024
1 parent 8be92ff commit 2d05b4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mapadroid/db/DbWebhookReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ async def get_stations_changed_since(session: AsyncSession, _timestamp: int):
ret.append({
"station_id": station.station_id,
"battle_level": station.battle_level,
"battle_spawn": int(station.battle_spawn.timestamp()),
"battle_start": int(station.battle_window_start.timestamp()),
"battle_end": int(station.battle_window_end.timestamp()),
"battle_spawn": int(station.battle_spawn.timestamp()) if station.battle_spawn else None,
"battle_start": int(station.battle_window_start.timestamp()) if station.battle_window_start else None,
"battle_end": int(station.battle_window_end.timestamp()) if station.battle_window_end else None,
"battle_pokemon_move_1": station.battle_pokemon_move_1,
"battle_pokemon_move_2": station.battle_pokemon_move_2,
"battle_pokemon_bread_mode": station.battle_pokemon_bread_mode,
Expand Down

0 comments on commit 2d05b4f

Please sign in to comment.