JorgenDIF / PP4-Riot-Rythm-Festival

The freedom of music
0 stars 1 forks source link

Bug Resolved: Edit and Delete Band Requests Fail with Primary Key #72

Open JorgenDIF opened 4 months ago

JorgenDIF commented 4 months ago

Description:

The functionality for editing and deleting band requests does not work when using primary keys (pk) as identifiers. Instead, these actions only succeed when slugs are used. This discrepancy leads to failures and errors in cases where primary keys are expected to function.

Steps to Reproduce:

Navigate to the band request editing page using a URL with a primary key. Attempt to edit the band request and submit the changes. Observe that the application does not process the request and returns an error. Repeat the steps for deleting a band request using a primary key. Expected Behavior: Both editing and deleting band requests should function correctly regardless of whether a slug or a primary key is used as the identifier. The application should handle both types of identifiers seamlessly.

Actual Behavior:

The application fails to edit or delete band requests when primary keys are used. The system only processes requests correctly when slugs are used as identifiers.

Suggested Fix:

Investigate and rectify the handling of identifiers in the view functions for editing and deleting band requests. Ensure that the application logic accommodates both slugs and primary keys correctly. This might involve modifying the URL patterns and corresponding view logic to correctly parse and utilize the primary key data.

Additional Information:

Check the URL configurations to ensure that routes are correctly set up for primary keys. Review error logs for specific messages or codes that could indicate why the failure occurs with primary keys.