fix: parse + store
This commit is contained in:
parent
6d996a4e2f
commit
65cc2e555f
@ -1,6 +1,6 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from noita.services.objectives import parse_objectives_from_logfile
|
||||
from noita.services.objectives import parse_objectives_and_store
|
||||
from .models import LogfileSubmission, Objectiv, ObjectivPoint, DeathCounter
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ class LogfileSubmissionAdmin(admin.ModelAdmin):
|
||||
|
||||
def validate_submission(self, request, queryset):
|
||||
for logfile in queryset:
|
||||
parse_objectives_from_logfile(logfile)
|
||||
parse_objectives_and_store(logfile)
|
||||
|
||||
self.message_user(request, f"{queryset.count()} submissions validated.")
|
||||
|
||||
|
||||
@ -27,7 +27,6 @@ def parse_objectives_and_store(logfile: LogfileSubmission) -> None:
|
||||
objectives = []
|
||||
deaths = []
|
||||
for idx, seed, ts in parse_objectives_from_logfile(logfile):
|
||||
print(idx, seed, ts)
|
||||
if idx in {"-", "DEBUG", "polylan-mod"}:
|
||||
continue
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user