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

bika.lims.catalog.indexers   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A is_active() 0 6 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