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

bug: Functionality Bug #66

Closed
MuhammadAliashraf opened this issue May 6, 2024 · 4 comments
Closed

bug: Functionality Bug #66

MuhammadAliashraf opened this issue May 6, 2024 · 4 comments

Comments

@MuhammadAliashraf
Copy link

Bug Report

DashPress version:

v1.0.4(Latest Version)

Current behavior:
Now Here is the URl:https://demo.dashpress.io/admin/film_actor
In This Page There is a Tabel In this Tabel, when we select one Row or one Check Box Then Its Selecting the All CheckBoxs To be Checked.

Expected behavior:
When i select the one checkBox Then its has to be select the one CheckBox Only that is Selected By User.

Steps to reproduce:
we have to review the code for the table

Other information:
image

@MuhammadAliashraf MuhammadAliashraf changed the title bug: Funcationality Bug bug: Functionality Bug May 6, 2024
@thrownullexception
Copy link
Contributor

Thanks @MuhammadAliashraf

The issue is not with DashPress but with the film_actor table. The issue is that this table does not have a primary key so it doesn't know which ID to select. If you try selecting multiple items on tables with a primary key (e.g https://demo.dashpress.io/admin/customer), this will not happen
There is no code change from my end to fix this issue other than to add a primary key to the database. Will look into adding a primary key for the table though

@MuhammadAliashraf
Copy link
Author

@thrownullexception
Thanks

@thrownullexception
Copy link
Contributor

Taking a look now I see why my checks are not even working, because I wrote this

"This entity doesn't have a primary key. Kindly ask your administrator to add one then restart the application and this error will go away."

And I check the schema and I see this

Screenshot 2024-05-06 at 16 28 56

The film_actor has a two primary keys which is problematic for Dashpress, so I will update the logic of the code above to also error out of the number of primary keys is not equal to one.

Thanks for reporting this issue

@thrownullexception
Copy link
Contributor

Added checks to block actions when there are multiple primary IDs, Won't solve this issue in particular but users will get the error when they try to performs on the entity

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

2 participants