Skip to content

Views on going#24

Merged
DDRMin merged 2 commits into
mainfrom
Views_on-going
May 10, 2025
Merged

Views on going#24
DDRMin merged 2 commits into
mainfrom
Views_on-going

Conversation

@DDRMin

@DDRMin DDRMin commented May 10, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 10, 2025 16:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"),

Copilot AI May 10, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"),

Copilot uses AI. Check for mistakes.
Comment thread warehouse_managment/warehouse/urls.py
@DDRMin DDRMin requested a review from InduwaraRathnayake May 10, 2025 16:57
@DDRMin DDRMin merged commit e462cac into main May 10, 2025
1 check failed
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.

3 participants