Skip to content

Commit

Permalink
[api] fix crash on parsing bugzilla time stamps
Browse files Browse the repository at this point in the history
don't trust rubocop ...
  • Loading branch information
adrianschroeter committed Mar 15, 2017
1 parent 2e6291a commit 75c6482
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/api/app/models/issue_tracker.rb
Expand Up @@ -219,7 +219,10 @@ def parse_single_bugzilla_issue(bugzilla_response)
end

if bugzilla_response["creation_time"].present?
issue.created_at = bugzilla_response["creation_time"].to_time_in_current_zone
# rubocop:disable Rails/Date
# rubocop bug, this is XMLRPC/DateTime not Rails/Date
issue.created_at = bugzilla_response["creation_time"].to_time
# rubocop:enable Rails/Date
else
issue.created_at = Time.now
end
Expand Down

0 comments on commit 75c6482

Please sign in to comment.