Skip to content

Commit

Permalink
small bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Yassir Akram committed Nov 25, 2024
1 parent f139d32 commit d905d22
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions website/database/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

import json
from dataclasses import dataclass
from dataclasses import dataclass, field
from datetime import datetime
from functools import cached_property
from itertools import chain
Expand Down Expand Up @@ -37,9 +37,9 @@

@dataclass
class PlayerData(object):
rolling_history: CircularBufferPlayer
capacities: CapacityData
cumul_emissions: CumulativeEmissionsData
rolling_history: CircularBufferPlayer = field(default_factory=CircularBufferPlayer)
capacities: CapacityData = field(default_factory=CapacityData)
cumul_emissions: CumulativeEmissionsData = field(default_factory=CumulativeEmissionsData)


@dataclass
Expand Down Expand Up @@ -712,8 +712,8 @@ def invalidate_recompute_and_dispatch_data_for_pages(

@dataclass
class NetworkData(object):
rolling_history: CircularBufferNetwork
capacities: CapacityData
rolling_history: CircularBufferNetwork = field(default_factory=CircularBufferNetwork)
capacities: CapacityData = field(default_factory=CapacityData)


class Network(db.Model):
Expand Down
4 changes: 2 additions & 2 deletions website/database/player_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

@dataclass
class OngoingConstructionCache(object):
level: int
prerequisites: list[int]
level: int = None
prerequisites: list[int] = None


class OngoingConstruction(db.Model):
Expand Down

0 comments on commit d905d22

Please sign in to comment.