mirror of
https://git.meshkee.com/Meshkee/backend.git
synced 2026-08-11 22:30:59 +04:30
Allow null price and unlimited stock on store item create/sync.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
5cd762c65d
commit
b5a54e4174
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user