jnraine / munkiserver

Visit https://github.com/munkiserver/munkiserver for active development — this repository is no longer maintained
85 stars 27 forks source link

package view broken after uploading copy_from_dmg item with custom pkginfo file #124

Closed dayglojesus closed 12 years ago

dayglojesus commented 12 years ago

I created a custom pkginfo file for the new version of Audacity. The installation works, removal works, but the package cannot be viewed. The package can be edited, but not viewed. The server log says...


Started GET "/package-dev/packages/Audacity" for redacted at 2012-01-16 13:28:30 -0800
  Processing by PackagesController#show as HTML
  Parameters: {"unit_shortname"=>"package-dev", "package_branch"=>"Audacity"}
Rendered packages/_record_header.html.erb (17.3ms)
Rendered packages/show.html.erb within layouts/application (23.5ms)
Completed 500 Internal Server Error in 81ms

ActionView::Template::Error (undefined method `<' for nil:NilClass):
    64:                 Package size
    65:                 <%= humanize_kilobytes(@package.installer_item_size) %>
    66:             
    67:             <% if !@package.installer_item_size == 0 or @package.installer_item_size < 0 %>
    68:                 
    69:                     Installed size 
    70:                     <%= humanize_kilobytes(@package.installed_size) %>
  app/views/packages/show.html.erb:67:in`_app_views_packages_show_html_erb___3645490799690217461_2212178360_2069702012152338288'
  app/controllers/packages_controller.rb:16:in `show'
jnraine commented 12 years ago

Fixed with commit 9eb6e8b9.