mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-22 15:50:32 +00:00
fix: unique item name on edit mode.
This commit is contained in:
@@ -335,6 +335,9 @@ export default class ItemsService implements IItemsService {
|
|||||||
// Validates the given item existance on the storage.
|
// Validates the given item existance on the storage.
|
||||||
const oldItem = await this.getItemOrThrowError(tenantId, itemId);
|
const oldItem = await this.getItemOrThrowError(tenantId, itemId);
|
||||||
|
|
||||||
|
// Validate whether the given item name already exists on the storage.
|
||||||
|
await this.validateItemNameUniquiness(tenantId, itemDTO.name, itemId);
|
||||||
|
|
||||||
// Validate the item category existance on the storage,
|
// Validate the item category existance on the storage,
|
||||||
if (itemDTO.categoryId) {
|
if (itemDTO.categoryId) {
|
||||||
await this.validateItemCategoryExistance(tenantId, itemDTO.categoryId);
|
await this.validateItemCategoryExistance(tenantId, itemDTO.categoryId);
|
||||||
|
|||||||
Reference in New Issue
Block a user