whe I try to do this I get "undefined method `committerships"

On Wednesday, 17 July 2013 10:54:36 UTC+4, cjohansen wrote:
>
> > I've deleted 3 users through admin console that were assigned to repo as 
> > commiters/reviewres/admins. 
> > Now when I try to access this repository I always get "Sorry, something 
> > went wrong" 
> > 
> > production.log says : 
> > 
> > ActionView::TemplateError (undefined method `email' for nil:NilClass) on 
> > line #24 of app/views/repositories/_committers_sidebar.html.erb: 
> > 21: <% @repository.committerships.users.each do |cs| -%> 
> > 22:   <li> 
> > 23:     <div class="user"> 
> > 24:       <%= avatar_from_email(cs.committer.email, :size => 16, :style 
> => 
> > "tiny") %> 
> > 25:       <%= link_to h(cs.committer.title), cs.committer -%> 
> > 26:       <% if @repository.user == cs.committer -%> 
> > 27:         <small class="hint">(<%= t("views.repos.creator") 
> %>)</small> 
> > 
> > 
> > I suspect that somehow - these users are still listed as collabrators 
> and 
> > it tries to access them but fails. 
>
> Yes, the committership objects are still left. Find the repository on 
> the commandline and do: 
>
> $ repository.committerships.select { |c| c.user.nil? }.map(&:destroy) 
>
> > ALso - how do I destroy repository from console? I've located the one I 
> > want to kill in console but repo.destroy just gives me "undefined 
> > method" 
>
> May be related to the above. repository.destroy is what Gitorious does 
> to destroy repositories: 
>
> https://v3.gitorious.org/gitorious/mainline/source/45fa5796c7bef13b83baa21e4801477c6e3f3039:app/controllers/repositories_controller.rb#L133
>  
>
> Christian 
>

-- 
-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Gitorious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitorious+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to