@@ -86,7 +86,7 @@ func (s *LocationSync) syncSingleLocation(ctx context.Context, location models.L
8686 }
8787
8888 if ! helpers .CompareJSONFields (existingLocation , locationRequest ) {
89- return s .updateLocationType (ctx , * existingLocation .Id , locationRequest )
89+ return s .updateLocation (ctx , * existingLocation .Id , locationRequest )
9090 }
9191
9292 log .Info ("location unchanged, skipping update" , "name" , locationRequest .Name )
@@ -103,8 +103,8 @@ func (s *LocationSync) createLocation(ctx context.Context, request nb.LocationRe
103103 return createdLocationType .Id , nil
104104}
105105
106- // updateLocationType updates an existing location in Nautobot
107- func (s * LocationSync ) updateLocationType (ctx context.Context , id string , request nb.LocationRequest ) (* string , error ) {
106+ // updateLocation updates an existing location in Nautobot
107+ func (s * LocationSync ) updateLocation (ctx context.Context , id string , request nb.LocationRequest ) (* string , error ) {
108108 updatedLocationType , err := s .locationSvc .Update (ctx , id , request )
109109 if err != nil || updatedLocationType == nil {
110110 return nil , fmt .Errorf ("failed to update location %s: %w" , request .Name , err )
0 commit comments