Skip to content

Commit

Permalink
[Siddarth] Fixing issues with json parsing for saving SAML Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddarth R committed Nov 25, 2018
1 parent 21e7f11 commit 7827efa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/models/saml_app_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ class SamlAppConfig < ApplicationRecord
belongs_to :group
belongs_to :organisation

serialize :config, JSON

def self.get_config(app_name, org_id)
SamlAppConfig.find_or_initialize_by(
app_name: app_name, organisation_id: org_id
Expand Down
6 changes: 3 additions & 3 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@
create_table "saml_app_configs", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
t.integer "group_id"
t.string "sso_url"
t.json "config"
t.text "config", limit: 4294967295, collation: "utf8mb4_bin"
t.integer "organisation_id"
t.string "app_name"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["group_id"], name: "index_saml_app_configs_on_group_id", using: :btree
t.index ["organisation_id"], name: "index_saml_app_configs_on_organisation_id", using: :btree
end
Expand Down

0 comments on commit 7827efa

Please sign in to comment.