Ok, sounds good.

David

----- Original Message -----
> From: "Lukáš Zapletal" <notifications@github.com>
> To: "Katello/katello" <katello@noreply.github.com>
> Cc: "David Davis" <daviddavis@redhat.com>
> Sent: Tuesday, January 8, 2013 6:53:49 AM
> Subject: Re: [katello] User org deletion 882311 (#1358)
> 
> 
> 
> In src/app/controllers/api/api_controller.rb: > @@ -100,8 +100,10 @@
> def find_organization
> >  
> >    def find_optional_organization
> >      if params[:organization_id]
> > -      @organization = Organization.first(:conditions => {:name =>
> > params[:organization_id]})
> > -      @organization = Organization.first(:conditions => {:label =>
> > params[:organization_id]}) if @organization.nil?
> > +      @organization =
> > Organization.without_deleting.first(:conditions => {:name =>
> > params[:organization_id]})
> Thanks for explanation. Rule of thumb: NEVER EVER try to make things
> better when working on errata. You can be totally sure it won't
> break anything, the history shows we are wrong sometimes. Errata =
> the most simple change that fixes the issue. Therefore I am going to
> change this in master (Katello) as a separate PR. Added to my TODO.
> LZ …
> 
> On Tue, Jan 08, 2013 at 02:21:19AM -0800, Petr Chalupa wrote: > @@
> -100,8 +100,10 @@ def find_organization > > def
> find_optional_organization > if params[:organization_id] > -
> @organization = Organization.first(:conditions => {:name =>
> params[:organization_id]}) > - @organization =
> Organization.first(:conditions => {:label =>
> params[:organization_id]}) if @organization.nil? > + @organization =
> Organization.without_deleting.first(:conditions => {:name =>
> params[:organization_id]}) Since you are touching the line anyway I
> would also suggest to use `where` instead of condition hash
> `:condition => `. Using condition hashes is somewhat deprecated
> behavior from older versions of Rails before `where` was introduced.
> --- Reply to this email directly or view it on GitHub:
> https://github.com/Katello/katello/pull/1358/files#r2575235
> 
> -- Later, Lukas "lzap" Zapletal #katello #systemengine
> 
> —
> Reply to this email directly or view it on GitHub .