| Total Complexity | 1 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 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 |