Skip to content

Commit

Permalink
Added "All" to user build stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightara committed Nov 5, 2019
1 parent a36cb46 commit 19eef22
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions raidar/management/commands/restat.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,11 @@ def _update_user(era: Era, user: User):

# Create pandas DataFrame
frame = DataFrame(raw_data)
for build, build_frame in frame.groupby(["archetype", "profession", "elite"]):
for area_id, area_frame in build_frame.groupby("area_id"):
area = Area.objects.get(id=area_id)
_update_stats(era, area, "All", area_frame, build, user)
for area_id, area_frame in frame.groupby("area_id"):
area = Area.objects.get(id=area_id)
for build, build_frame in area_frame.groupby(["archetype", "profession", "elite"]):
_update_stats(era, area, "All", build_frame, build, user)
_update_stats(era, area, "All", area_frame, (0, 0, 0), user)


def update_era(era: Era, encounters: Iterable[Encounter]):
Expand Down

0 comments on commit 19eef22

Please sign in to comment.