Skip to content

Commit

Permalink
[webui] fix crashes in cache handling
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Jul 6, 2015
1 parent bc5860c commit 96d5673
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/app/models/package.rb
Expand Up @@ -105,7 +105,7 @@ def check_cache(project, package, opts)
end
pid, old_pkg_time, old_prj_time = Rails.cache.read(@key)
if pid
pkg=Package.where(id: pid).first
pkg=Package.where(id: pid).includes(:projects).first
return pkg if pkg && pkg.updated_at == old_pkg_time && pkg.project.updated_at == old_prj_time
Rails.cache.delete(@key) # outdated anyway
end
Expand Down

0 comments on commit 96d5673

Please sign in to comment.