-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Unable to delete things. #321
Comments
Can you check the exact version you are running? |
The docker image is the :latest tag. Workout tracker itself reports "branch master (c6d4ea0)" |
Pass user validation as a middleware instead of a SuccessFunc. Add redirect to signout endpoint if user is not found. Add error logging for failed user validation. Ref: #321 Signed-off-by: Jo Vandeginste <[email protected]>
Would you be able to reproduce this with sqlite as the database engine? |
No; using sqlite I seem to be able to delete both workouts and users with no issue, so that suggests its PostGres related. Interestingly, initially the docker container kept crashing when I tried to use sqlite instead of PG. After checking the logs I realised this was because my JWT environment variable was a mess with brackets and spaces etc. (failure of variable substitution by ansible when I deployed the compose stack because of my fat fingers). I don't know if thats expected or not, but using the exact same env var the container started fine when using postgres. Just to be clear, I corrected the JWT var and made a new PG database, and the inability to delete persists, so its not related, but thought it worth mentioning in case its also unintentional behaviour. |
Then I will need to test with a postgres backend |
Can you check the latest master image? |
Using the latest docker container (6d65746) and I have been able to delete the administrator user successfully. However, attempting to delete the workout I uploaded as a test still fails with the same error. |
Was this a new test, or the previous database content? |
I have the same problem: Something went wrong: ERROR: update or delete on table "map_data" violates foreign key constraint "fk_map_data_details" on table "map_data_details" |
Can you make sure to use the latest image (from commit e55abb5)? |
Yes, I use the latest one with postgresql backend. |
Could you find a way to reproduce? I tried here but to no avail... |
It's easy to reproduce, since it happens each time I try to delete a workout. What additional info can help here? |
Can you reproduce from an empty setup? Because I can not reproduce from scratch. |
It is new setup, I've deployed it to the server and just added some tracks. |
I have uploaded a brief test track, to check the import functionality from my phone. Having it confirmed it worked, I attempted to delete the workout but received the following error:
Something went wrong: ERROR: update or delete on table "map_data" violates foreign key constraint "fk_map_data_details" on table "map_data_details" (SQLSTATE 23503)
I get the a similar error when attempting to delete the initial admin user (after creating another user and ensuring they have admin privileges) but for "fk_users_profile" on table "profiles".
I am using a docker compose deployment with PostGres 16 alpine as the database.
The text was updated successfully, but these errors were encountered: