Commit e50c01fb authored by Jasper Maes's avatar Jasper Maes

Rails5: Fix epics finder count_key method

In Rails5, the state enum value is passed instead of the
database integer.
parent 26a24e61
......@@ -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