Commit 5deb2007 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'rails5-epic-finder-fix' into 'master'

Rails5: Fix epics finder count_key method

See merge request gitlab-org/gitlab-ee!7822
parents 26a24e61 e50c01fb
......@@ -38,7 +38,11 @@ class EpicsFinder < IssuableFinder
private
def count_key(value)
Epic.states.invert[Array(value).last].to_sym
if Gitlab.rails5?
Array(value).last.to_sym
else
Epic.states.invert[Array(value).last].to_sym
end
end
# rubocop: disable CodeReuse/ActiveRecord
......
---
title: 'Rails5: Fix epics finder count_key method In Rails5, the state enum value
is passed instead of the database integer.'
merge_request: 7822
author: Jasper Maes
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment