axelclark / ex338

Web application to manage the 338 Challenge fantasy sports league
https://the338challenge.com
MIT License
22 stars 7 forks source link

Error when sending invite #434

Closed axelclark closed 6 years ago

axelclark commented 6 years ago

Error when sending invite because LoadLeagues plug is not used for coherence protected routes.

key :leagues not found in: %{changeset: #Ecto.Changeset<action: nil, changes: %{}, errors: [name: {"can't be blank", [validation: :required]}, email: {"can't be blank", [validation: :required]}], data: #Ex338.Coherence.Invitation<>, valid?: false>, current_user: %Ex338.User{__meta__: #Ecto.Schema.Metadata<:loaded, "users">, admin: true, current_password: nil, current_sign_in_at: #Ecto.DateTime<2018-07-09 18:11:17>, current_sign_in_ip: "{10, 79, 204, 56}", email: "rybrown@comcast.net", failed_attempts: 0, fantasy_teams: #Ecto.Association.NotLoaded<association :fantasy_teams is not loaded>, id: 4, inserted_at: ~N[2016-09-10 00:23:37.000000], last_sign_in_at: #Ecto.DateTime<2018-07-09 15:59:09>, last_sign_in_ip: "{10, 101, 156, 244}", locked_at: nil, name: "Ryan Brown", owners: #Ecto.Association.NotLoaded<association :owners is not loaded>, password: nil, password_confirmation: nil, password_hash: "$2b$12$xIC6moEQDZ6776QgulLDD.fxzY0O5ZSWXWWpJ4VnPLwlLjQM6KuqC", remember_created_at: nil, reset_password_sent_at: nil, reset_password_token: nil, sign_in_count: 935, submitted_trades: #Ecto.Association.NotLoaded<association :submitted_trades is not loaded>, trade_votes: #Ecto.Association.NotLoaded<association :trade_votes is not loaded>, unlock_token: nil, updated_at: ~N[2018-07-09 18:11:17.225647]}, layout: {Ex338Web.LayoutView, "app.html"}}
axelclark commented 6 years ago

See bug introduced in https://github.com/axelclark/ex338/commit/b5c2ad84f0f20b038163166e290344ed1482976c