Browse Source

feat: don't set log owning org as user's org if that org doesn't hold stock

fix-remove-attr-accessors-from-questions-in-cldc-1723
Sam Seed 2 years ago
parent
commit
b7082c6212
  1. 3
      app/controllers/logs_controller.rb

3
app/controllers/logs_controller.rb

@ -60,8 +60,9 @@ private
end
def org_params
owning_organisation_id = current_user.organisation.holds_own_stock? ? current_user.organisation.id : nil
{
"owning_organisation_id" => current_user.organisation.id,
"owning_organisation_id" => owning_organisation_id,
"managing_organisation_id" => current_user.organisation.id,
"created_by_id" => current_user.id,
}

Loading…
Cancel
Save