From a7fdc4d7414f2468d175687a89b76782b676eb9b Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 14 Dec 2016 15:55:12 +0100 Subject: [PATCH] fix potentital issue with sso + enterprise profile --- app/views/api/members/show.json.jbuilder | 2 +- db/schema.rb | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/views/api/members/show.json.jbuilder b/app/views/api/members/show.json.jbuilder index 8f061f96a..7f417dffe 100644 --- a/app/views/api/members/show.json.jbuilder +++ b/app/views/api/members/show.json.jbuilder @@ -30,7 +30,7 @@ json.profile do json.address do json.id @member.profile.organization.address.id json.address @member.profile.organization.address.address - end + end if @member.profile.organization.address end if @member.profile.organization end diff --git a/db/schema.rb b/db/schema.rb index f42f20eb9..1b7f84d7f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -289,7 +289,7 @@ ActiveRecord::Schema.define(version: 20161123104604) do t.boolean "is_read", default: false t.datetime "created_at" t.datetime "updated_at" - t.string "receiver_type" + t.string "receiver_type", limit: 255 t.boolean "is_send", default: false t.jsonb "meta_data", default: {} end @@ -320,7 +320,6 @@ ActiveRecord::Schema.define(version: 20161123104604) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "profile_url" - t.string "logout_endpoint" end create_table "offer_days", force: :cascade do |t| @@ -467,7 +466,7 @@ ActiveRecord::Schema.define(version: 20161123104604) do t.datetime "published_at" end - add_index "projects", ["slug"], name: "index_projects_on_slug", using: :btree + add_index "projects", ["slug"], name: "index_projects_on_slug", unique: true, using: :btree create_table "projects_components", force: :cascade do |t| t.integer "project_id" @@ -536,8 +535,8 @@ ActiveRecord::Schema.define(version: 20161123104604) do t.datetime "updated_at" t.integer "availability_id" t.datetime "ex_start_at" - t.datetime "ex_end_at" t.datetime "canceled_at" + t.datetime "ex_end_at" t.boolean "offered", default: false end @@ -719,6 +718,7 @@ ActiveRecord::Schema.define(version: 20161123104604) do add_index "user_trainings", ["user_id"], name: "index_user_trainings_on_user_id", using: :btree create_table "users", force: :cascade do |t| + t.string "username", limit: 255 t.string "email", limit: 255, default: "", null: false t.string "encrypted_password", limit: 255, default: "", null: false t.string "reset_password_token", limit: 255 @@ -741,7 +741,6 @@ ActiveRecord::Schema.define(version: 20161123104604) do t.boolean "is_allow_contact", default: true t.integer "group_id" t.string "stp_customer_id", limit: 255 - t.string "username", limit: 255 t.string "slug", limit: 255 t.boolean "is_active", default: true t.boolean "invoicing_disabled", default: false