|
|
|
@ -25,7 +25,7 @@ from .schema import (CalculationResultsRead,
|
|
|
|
|
|
|
|
|
|
|
|
from .utils import get_months_between
|
|
|
|
from .utils import get_months_between
|
|
|
|
from src.scope_equipment_part.model import ScopeEquipmentPart
|
|
|
|
from src.scope_equipment_part.model import ScopeEquipmentPart
|
|
|
|
|
|
|
|
import copy
|
|
|
|
|
|
|
|
|
|
|
|
class ReliabilityService:
|
|
|
|
class ReliabilityService:
|
|
|
|
"""Service class for handling reliability API calls"""
|
|
|
|
"""Service class for handling reliability API calls"""
|
|
|
|
@ -500,7 +500,7 @@ async def run_simulation(*, db_session: DbSession, calculation: CalculationData,
|
|
|
|
spareparts = {
|
|
|
|
spareparts = {
|
|
|
|
sparepart.id: {
|
|
|
|
sparepart.id: {
|
|
|
|
'data': sparepart,
|
|
|
|
'data': sparepart,
|
|
|
|
'stock': sparepart.stock
|
|
|
|
'stock': copy.copy(sparepart.stock)
|
|
|
|
} for sparepart in sparepars_query.scalars().all()
|
|
|
|
} for sparepart in sparepars_query.scalars().all()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|