Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1791 Fix listing dependencies in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
rkorytkowski committed Sep 9, 2024
1 parent 11d62ad commit 37fa9cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/importers/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ImportTask(BaseModel):
time_started: datetime = datetime.now()
_time_finished: datetime = PrivateAttr(default=None)
dependencies: list = []
initial_summary: ImportTaskSummary = ImportTaskSummary(dependencies=dependencies)
initial_summary: ImportTaskSummary = ImportTaskSummary()
final_summary: ImportTaskSummary = None

@staticmethod
Expand Down Expand Up @@ -260,9 +260,11 @@ def run(self): # pylint: disable=too-many-locals
for _, count in files.items():
result.initial_summary.total += count

result.initial_summary.dependencies = dependencies
return result.model_dump(exclude={'summary', 'final_summary'})

import_task = ImportTask(time_started=time_started, dependencies=dependencies)
import_task.initial_summary.dependencies = dependencies
import_task.time_finished = datetime.now()
return import_task

Expand Down

0 comments on commit 37fa9cc

Please sign in to comment.