Fixed 500 error on branch and tag creation via UI

Also fixes issue with branch/tag removing via UI

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Version 6.6.2

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>