Skip to content

Commit

Permalink
Handle when integer type custom field returns array
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod committed Jan 19, 2020
1 parent ae8d2e1 commit d7f2f99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/qa_post_edits.rb
Expand Up @@ -111,8 +111,8 @@ class ::Post
self.ignored_columns = %w(vote_count)

def qa_vote_count
if custom_fields['vote_count'].present?
custom_fields['vote_count'].to_i
if vote_count = custom_fields['vote_count']
[*vote_count].first.to_i
else
0
end
Expand Down

0 comments on commit d7f2f99

Please sign in to comment.