Skip to content

Commit

Permalink
Merge pull request #4804 from adrianschroeter/fix_consistency_check_c…
Browse files Browse the repository at this point in the history
…rash

Fix consistency check crash
  • Loading branch information
ChrisBr committed Apr 5, 2018
2 parents cac77b7 + dde9e3c commit 5911b57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/app/jobs/consistency_check_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def package_existence_consistency_check(project, fix = nil)
# restore from backend
diff.each do |package|
begin
meta = Backend::Api::Sources::Project.meta(project.name, package)
meta = Backend::Api::Sources::Project.meta(project.name)
pkg = project.packages.new(name: package)
pkg.commit_opts = { no_backend_write: 1 }
pkg.update_from_xml(Xmlhash.parse(meta), true) # ignore locked project
Expand Down
2 changes: 2 additions & 0 deletions src/api/app/mailers/admin_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class AdminMailer < ActionMailer::Base

def set_headers
@host = ::Configuration.obs_url
return unless @host
@configuration = ::Configuration.first

headers['Precedence'] = 'bulk'
Expand All @@ -23,6 +24,7 @@ def error(message)

def warning(message, level = 'Warning')
set_headers
return unless @host

# FIXME/to be implemented:
# we may want to use the event system to allow to manage subscribers.
Expand Down

0 comments on commit 5911b57

Please sign in to comment.