noosfero | WIP: Rails 5.1.6 Upgrade (!1438)

Gabriel Silva gitlab at mg.gitlab.com
Wed Oct 31 13:07:40 BRST 2018


Gabriel Silva started a new discussion on app/models/profile_categorization.rb:

>      end
>    end
>  
> -  def self.remove_region(profile)
> +  def self.remove_region profile
>      if profile.old_region_id
>        ids = Region.find(profile.old_region_id).hierarchy.map(&:id)
> -      self.delete_all(:profile_id => profile.id, :category_id => ids)
> +      self.delete_all

Isn't this going to delete all regions? Shouldn't you filter it first?

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1438#note_113533077
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20181031/594d6f6d/attachment-0001.html>


More information about the Noosfero-dev mailing list