@ -7,7 +7,7 @@ from src.auth.service import CurrentUser
from src . database . core import DbSession
from src . database . service import search_filter_sort_paginate
from src . overhaul_activity . model import OverhaulActivity
from src . utils import time_now
from src . utils import time_now , update_model
from src . standard_scope . model import MasterEquipment , StandardScope , EquipmentOHHistory
from src . workscope_group . model import MasterActivity
from src . workscope_group_maintenance_type . model import WorkscopeOHType
@ -132,9 +132,7 @@ async def update(*, db_session: DbSession, scope: OverhaulScope, scope_in: Scope
update_data = scope_in . model_dump ( exclude_defaults = True )
for field in data :
if field in update_data :
setattr ( scope , field , update_data [ field ] )
update_model ( scope , update_data )
await db_session . commit ( )