aesmail / aesmail/kaffy

[BUG] Having a key in the kaffy config different from the name of the model causes changeset attrs to be empty

オープン
#337 コメント 0 件 リアクション 0 件 担当者 1 名 @aesmail が担当を希望しています GitHub で見る
bug
主要言語
Elixir
スター
1.4k
フォーク
171
PR マージ指標
30日以内にマージされた PR はありません

説明

**Versions Used**
Kaffy: 0.10.3
Phoenix: 1.7.10
Elixir:

Erlang/OTP 27 [erts-15.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

Elixir 1.18.2 (compiled with Erlang/OTP 27)

**What's actually happening?**

We created a new kaffy resource, and the attrs passed to the changeset where always empty, both on the create and the update.

**What should happen instead?**

The attrs should be filled with the values passed in the form

**Code**

```
def create_resources(_conn) do
[
user_management: [
name: "User Management",
resources: [
a_different_name: [
schema: App.Models.User,
admin: AppWeb.Kaffy.UserAdmin
]
]
]
end
```

Notice the key in the resources list called `a_different_name` and the schema ending with`User`.

As soon as we changed the key to `user`, it worked.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。