Subversion Repositories SmartDukaan

Rev

Rev 563 | Rev 598 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 563 Rev 576
Line 51... Line 51...
51
    try:
51
    try:
52
        return query.one()
52
        return query.one()
53
    except:
53
    except:
54
        raise InventoryServiceException(109, "Item not found")
54
        raise InventoryServiceException(109, "Item not found")
55
        
55
        
56
def is_active(item_id):   
56
def is_active(item_id):
-
 
57
    try:
57
    item = get_Item(item_id)
58
        item = get_item_by_catalog_id(item_id)
58
    return item.status == status.ACTIVE
59
        return item.status == status.ACTIVE
-
 
60
    except InventoryServiceException:
-
 
61
        return False
59
        
62
        
60
def get_Warehouse(warehouse_id):
63
def get_Warehouse(warehouse_id):
61
    return Warehouse.get_by(id=warehouse_id)
64
    return Warehouse.get_by(id=warehouse_id)
62
 
65
 
63
def get_all_warehouses_by_status(status):
66
def get_all_warehouses_by_status(status):