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

Fix database constraints and improve data matching #326

Merged
merged 4 commits into from
Nov 11, 2024

Conversation

jovandeginste
Copy link
Owner

This fixes a number of constraint issues where deletes were not cascaded etc.

A few other issues were fixed along the way.

This commit introduces error handling for the case where a user is not found
during the admin user edit process.

- Previously, if a user was not found, the application would continue with an
  empty user object, which could lead to unexpected behavior.
- Now, the `adminAddUser` function returns an error if a user is not found.
- The `adminUserEditHandler` function now handles the error and displays a user
  not found message to the user.
- This ensures that the application behaves as expected in all cases and
  provides a more user-friendly experience.
Adds a new `TotalRepetitions()` method to the `Workout` struct. This method
returns the total number of repetitions for the workout, taking into account the
workout data. This is useful for calculating the total work done for a workout.
This fixes a number of constraint issues where deletes were not cascaded
etc.

Signed-off-by: Jo Vandeginste <[email protected]>
@jovandeginste jovandeginste merged commit 4ec0ebc into master Nov 11, 2024
3 checks passed
@jovandeginste jovandeginste deleted the fix-constraint-deletes branch November 11, 2024 20:55
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

Successfully merging this pull request may close these issues.

1 participant