Skip to content

Commit

Permalink
[webui] There is already a Patchinfo model...
Browse files Browse the repository at this point in the history
  • Loading branch information
saschpe committed Jan 12, 2012
1 parent 29cea02 commit 135c00d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/webui/app/models/project.rb
Expand Up @@ -411,10 +411,8 @@ def maintenance_incidents(type = 'open')
def patchinfo
cachekey = "maintenance_incident_patchinfo_#{self.name}"
return Rails.cache.fetch(cachekey, :expires_in => 5.minutes) do
#TODO: We may want to have a PatchInfo model (with API support):
begin
frontend = FrontendCompat.new
ActiveXML::Base.new(frontend.get_source(:project => self.name, :package => 'patchinfo', :filename => '_patchinfo'))
Patchinfo.find_cached(:project, :self.name, :package => 'patchinfo')
rescue ActiveXML::Transport::Error, ActiveXML::ParseError => e
nil
end
Expand Down

0 comments on commit 135c00d

Please sign in to comment.