diff --git a/src/overhaul_activity/service.py b/src/overhaul_activity/service.py index 23773c5..48702d3 100644 --- a/src/overhaul_activity/service.py +++ b/src/overhaul_activity/service.py @@ -102,9 +102,11 @@ async def get_all( results = [] for equipment in data: + if not equipment.master_equipment: + continue res = OverhaulActivityRead( id=equipment.id, - material_cost=35000000000, + material_cost=350000000000, service_cost=200000000, location_tag=equipment.location_tag, equipment_name=equipment.master_equipment.name if equipment.master_equipment else None, diff --git a/src/standard_scope/service.py b/src/standard_scope/service.py index 1b0f12c..f2889ae 100644 --- a/src/standard_scope/service.py +++ b/src/standard_scope/service.py @@ -49,6 +49,8 @@ async def get_all(*, common, oh_scope: Optional[str] = None): .join(EquipmentWorkscopeGroup.workscope_group) .join(MasterActivity.oh_types) .join(WorkscopeOHType.oh_type) + .join(StandardScope.master_equipment) + .filter(MasterEquipment.location_tag.is_not(None)) .filter(MaintenanceType.name == oh_scope) # .filter(