You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: set_attributes_service.rb
    path of file: ./repos/openproject/modules/costs/app/services/time_entries
    
    the code of the file until where you have to start completion: #-- copyright
# OpenProject is an open source project management sof
    
    def set_attributes(_attributes)
      model.attributes = params

      ##
      # Update project context if moving time entry
      if no_project_or_context_changed?
        model.project = model.work_package&.project
      end