Fix for #4535 ('Test settings' button for services gives 500 on empty repo)

Created by: rveede

This will fix the issue (#4535 (closed)).

合并请求报告