grandnode / grandnode2

Open-Source eCommerce Platform on .NET Core, MongoDB, AWS DocumentDB, Azure CosmosDB, LiteDB & Vue.js
https://grandnode.com/
GNU General Public License v3.0
1.06k stars 435 forks source link

Setting the dates to null values on delete to handle the model state error #435

Open jithendraprasad9999 opened 9 months ago

jithendraprasad9999 commented 9 months ago

Resolves #433 Type: bugfix

Issue

Not able to delete the Product Tier Price when we assign the start date end time.

Solution

Issue is when we try to delete the Product Tier Price item with start time and end time it is , start time and end is going as GMT time and we are facing the model state error . So avoid that when we delete the item setting the start and end date to null.

Breaking changes

No

Testing

  1. Navigate to admin panel.
  2. Choose products from catalog menu and then pick any product go to prices tab and create a tire price with start and end time.
  3. Once creation of product price is done , we can delete the tire price item without any issue.
KrzysztofPajak commented 9 months ago

@jithendraprasad9999 Thanks for PR, I think we should find other solution. The best way will be send request with data model with properties: productId and TierPriceId.

jithendraprasad9999 commented 9 months ago

@jithendraprasad9999 Thanks for PR, I think we should find other solution. The best way will be send request with data model with properties: productId and TierPriceId.

Sure @KrzysztofPajak i will update the PR