Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNOE-857] Allowed organization to be added to staff divisions #640

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MAhsenArif
Copy link
Contributor

No description provided.

@MAhsenArif MAhsenArif force-pushed the auto_assign_staff_division branch 2 times, most recently from 483dd4f to ecd4152 Compare January 26, 2018 13:38
@ouranos ouranos requested review from ouranos and manu-d January 30, 2018 04:33
Copy link
Contributor

@ouranos ouranos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment about the mass assignement of client_ids

@@ -141,5 +142,19 @@ def update_app_list
existing_apps.reload
end
end

def update_sub_tenants
return if params[:organization].key?(:sub_tenant_ids).blank?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key? returns true or false so no need for blank? here


sub_tenants = MnoEnterprise::SubTenant.where({'id.in' => params[:organization][:sub_tenant_ids]})

sub_tenants.to_a.each do |sub_tnt|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really scalable if we have a huge list for client_ids.
See MNOE-869 and the fix added in #532

@MAhsenArif MAhsenArif force-pushed the auto_assign_staff_division branch from ecd4152 to 82b079e Compare January 31, 2018 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants