Skip to content

Fix bug causing 'Import in progress' to be shown while a mirror is updating

Douwe Maan requested to merge dm-project-updating-mirror into master

ProjectsController#show has this little bit of code:

    if @project.import_in_progress? && !@project.updating_mirror?
      redirect_to project_import_path(@project)
      return
    end

@project.import_in_progress? && !@project.updating_mirror? works out to (pseudo code) (started || scheduled) && !(mirror && started), which means that mirror && scheduled would still result in a redirect.

I'm changing that by having Project#updating_mirror? be true in the scheduled state as well. I checked the other call sites of that method, and verified that the new behavior makes sense there too.

Merge request reports