Passed
Push — master ( 5e306e...e48f16 )
by Jordi
04:40
created

bika.lims.catalog.indexers.is_active()   A

Complexity

Conditions 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nop 1
1
# -*- coding: utf-8 -*-
2
#
3
# This file is part of SENAITE.CORE
4
#
5
# Copyright 2018 by it's authors.
6
# Some rights reserved. See LICENSE.rst, CONTRIBUTORS.rst.
7
8
from Products.Archetypes.interfaces import IBaseObject
9
from bika.lims import api
10
from plone.indexer import indexer
11
12
13
@indexer(IBaseObject)
14
def is_active(instance):
15
    """Returns False if the status of the instance is 'cancelled' or 'inactive'.
16
    Otherwise returns True
17
    """
18
    return api.is_active(instance)
19