• Stan Hu's avatar
    Fix 500 errors with legacy appearance logos · 922d97d9
    Stan Hu authored
    Prior to GitLab 9.0, attachments were not tracked the `uploads` table,
    so it was possible that the appearance logos were just stored in the
    database as a string and mounted via CarrierWave.
    
    https://gitlab.com/gitlab-org/gitlab-ce/issues/29240 implemented in
    GitLab 10.3 was supposed to cover populating the `uploads` table for all
    attachments, including all the logos from appearances. However, it's
    possible that didn't work for logos or the `uploads` entry was orphaned.
    
    GitLab instances that had a customized logo with no associated `uploads`
    entry would see Error 500s. The only way to fix this is to delete the
    `logo` column from the `appearances` table and re-upload the attachment.
    
    This change makes things more robust by falling back to the original
    behavior if the upload is not available.
    
    Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/9357
    922d97d9
appearance.rb 1.75 KB