Commit 62ee78a8ea9c75264a7b753cfc60023bab58927b
1 parent
4cd24a8b
Exists in
master
and in
1 other branch
Don't crash migration on save if IssueTracker doesn't have username or password
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/models/issue_trackers/github_issues_tracker.rb
@@ -21,7 +21,7 @@ class IssueTrackers::GithubIssuesTracker < IssueTracker | @@ -21,7 +21,7 @@ class IssueTrackers::GithubIssuesTracker < IssueTracker | ||
21 | 21 | ||
22 | def check_params | 22 | def check_params |
23 | if Fields.detect {|f| self[f[0]].blank? } | 23 | if Fields.detect {|f| self[f[0]].blank? } |
24 | - errors.add :base, 'You must specify your GitHub repository, username and password' | 24 | + errors.add :base, 'You must specify your GitHub username and password' |
25 | end | 25 | end |
26 | end | 26 | end |
27 | 27 |
db/migrate/20120603112130_change_github_url_to_github_repo.rb
@@ -3,7 +3,7 @@ class ChangeGithubUrlToGithubRepo < Mongoid::Migration | @@ -3,7 +3,7 @@ class ChangeGithubUrlToGithubRepo < Mongoid::Migration | ||
3 | App.collection.update({}, {'$rename' => {'github_url' => 'github_repo'}}, multi: true, safe: true) | 3 | App.collection.update({}, {'$rename' => {'github_url' => 'github_repo'}}, multi: true, safe: true) |
4 | App.all.each do |app| | 4 | App.all.each do |app| |
5 | app.send :normalize_github_repo | 5 | app.send :normalize_github_repo |
6 | - app.save! | 6 | + app.save |
7 | end | 7 | end |
8 | end | 8 | end |
9 | 9 |