Views on going#24
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds new endpoints for supplier product management.
- Introduces a GET endpoint to retrieve supplier product prices with annotation support.
- Implements a POST endpoint for adding or updating supplier products.
- Updates URL configuration to include the new endpoints.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| warehouse_managment/warehouse/views.py | Added two endpoints: one for retrieving supplier product prices and another for adding/updating supplier products. |
| warehouse_managment/warehouse/urls.py | Updated the URL patterns to include the new endpoints. |
| # POST endpoint to accept or reject an order request and update inventory | ||
| path('order/handle/', handle_order_status, name='handle_order_status'), | ||
| # POST endpoint to add or update a supplier product | ||
| path("/supplier-product/add_or_update/", add_supplier_product, name="update_supplier_product"), |
There was a problem hiding this comment.
The leading slash in the URL pattern is unconventional in Django and may cause issues with URL resolution. Consider removing the leading slash to align with standard Django URL patterns.
Suggested change
| path("/supplier-product/add_or_update/", add_supplier_product, name="update_supplier_product"), | |
| path("supplier-product/add_or_update/", add_supplier_product, name="update_supplier_product"), |
InduwaraRathnayake
approved these changes
May 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.