Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Form as an Action bug #166

Open
swrobel opened this issue May 7, 2024 · 0 comments
Open

Custom Form as an Action bug #166

swrobel opened this issue May 7, 2024 · 0 comments

Comments

@swrobel
Copy link
Contributor

swrobel commented May 7, 2024

I've created a custom form to allow updating a user's password. It's pretty simple.

Screenshot 2024-05-07 at 10 47 31 AM Screenshot 2024-05-07 at 10 47 46 AM

If I update a user's password by going directly to the form, selecting the user, and submitting, everything happens as expected

328624320-bf2810d0-0c77-41e7-af49-b29ac23f28a9

The PUT request looks to be as expected:

method=PUT path=/admin/api/data/users/3f79bd67-a017-47c5-9415-641a8e42b2dc format=html controller=Motor::DataController action=update status=200 allocations=72292 duration=203.03 view=0.14 db=10.83 params={password: "[FILTERED]", resource: "users", data: {password: "[FILTERED]", id: "3f79bd67-a017-47c5-9415-641a8e42b2dc"}}

However, if I do it through a specific user's page using the action, it fails, and seems to PUT basically the entire User record with associations (some of our data model redacted here, but it's a lot of fields)

method=PUT path=/admin/api/data/users/3f79bd67-a017-47c5-9415-641a8e42b2dc format=html controller=Motor::DataController action=update status=500 allocations=3831 duration=176.69 view=0.62 db=1.57 params={created_at: "2021-03-11T23:38:34.905Z", updated_at: "2024-05-07T17:49:50.927Z", name: "Stefan Wrobel", ... , avatar_attachment: {id: "c9300f45-fb17-4957-8894-20627f07f680", name: "avatar", record_type: "User", record_id: "3f79bd67-a017-47c5-9415-641a8e42b2dc", created_at: "2024-03-03T02:21:49.507Z", path: "/rails/active_storage/blobs/redirect/..."}, password: "[FILTERED]"}}
Screenshot 2024-05-07 at 10 54 37 AM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant