Allow null price and unlimited stock on store item create/sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-08 15:36:41 +03:30
co-authored by Cursor
parent 5cd762c65d
commit b5a54e4174
2 changed files with 32 additions and 8 deletions
+2 -2
View File
@@ -916,11 +916,11 @@ export class StoreItemsService {
existingKeys.add(key);
batchKeys.add(key);
if (item.price !== undefined && item.price < 0) {
if (item.price != null && item.price < 0) {
throw new BadRequestException('Price cannot be negative');
}
if (item.stockQuantity !== undefined && item.stockQuantity < 0) {
if (item.stockQuantity != null && item.stockQuantity < 0) {
throw new BadRequestException('Stock cannot be negative');
}
}