Skip to content

Commit

Permalink
Fixed Generic Map Uploads.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraust committed Jun 1, 2024
1 parent 4fbf60b commit b1ec2fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion combatlog/models/combatlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ def update_metadata_file(self, file):
internal_difficulty=combat.difficulty,
variant__start_date__lte=combat.start_time,
variant__end_date__gt=combat.end_time,
) | Ladder.objects.filter(
internal_name=combat.map,
internal_difficulty=None,
variant__start_date__lte=combat.start_time,
variant__end_date__gt=combat.end_time,
)

# Now need to apply exclusions
Expand Down Expand Up @@ -124,7 +129,10 @@ def update_metadata_file(self, file):
if ladder.is_solo and len(players) != 1:
continue

if ladder.manual_review_threshold and player.get(ladder.metric) > ladder.manual_review_threshold:
if (
ladder.manual_review_threshold
and player.get(ladder.metric) > ladder.manual_review_threshold
):
visible = False
manual_review = f", but result needs to be manually reviewed. Combat Log ID #{self.pk}"
else:
Expand Down
2 changes: 2 additions & 0 deletions ladder/views/ladder_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import logging

from django.core.exceptions import ImproperlyConfigured
from django.db.models.query import QuerySet
from django_filters.views import FilterView
from rest_framework.filters import OrderingFilter
from rest_framework.mixins import ListModelMixin, RetrieveModelMixin
Expand Down

0 comments on commit b1ec2fd

Please sign in to comment.