Browse Source

Lookup org id for API requests (#368)

pull/370/head
baarkerlounger 3 years ago committed by GitHub
parent
commit
5c94dcd211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      app/controllers/case_logs_controller.rb

5
app/controllers/case_logs_controller.rb

@ -99,7 +99,10 @@ private
def api_case_log_params
return {} unless params[:case_log]
params.require(:case_log).permit(CaseLog.editable_fields)
permitted = params.require(:case_log).permit(CaseLog.editable_fields)
permitted["owning_organisation"] = Organisation.find_by(permitted["owning_organisation"])
permitted["managing_organisation"] = Organisation.find_by(permitted["managing_organisation"])
permitted
end
def find_resource

Loading…
Cancel
Save