Passed
Push — master ( af2087...3e7509 )
by Ramon
05:04
created

bika.lims.workflow.referenceanalysis.guards   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 12
dl 0
loc 39
rs 10
c 0
b 0
f 0

5 Functions

Rating   Name   Duplication   Size   Complexity  
A guard_multi_verify() 0 4 1
A guard_submit() 0 4 1
A guard_verify() 0 4 1
A guard_unassign() 0 4 1
A guard_retract() 0 4 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 bika.lims.workflow.analysis import guards as analysis_guards
9
10
11
def guard_submit(reference_analysis):
12
    """Return whether the transition "submit" can be performed or not
13
    """
14
    return analysis_guards.guard_submit(reference_analysis)
15
16
17
def guard_multi_verify(duplicate_analysis):
18
    """Return whether the transition "multi_verify" can be performed or not
19
    """
20
    return analysis_guards.guard_multi_verify(duplicate_analysis)
21
22
23
def guard_verify(reference_analysis):
24
    """Return whether the transition "verify" can be performed or not
25
    """
26
    return analysis_guards.guard_verify(reference_analysis)
27
28
29
def guard_unassign(reference_analysis):
30
    """Return whether the transition 'unassign' can be performed or not
31
    """
32
    return analysis_guards.guard_unassign(reference_analysis)
33
34
35
def guard_retract(duplicate_analysis):
36
    """Return whether the transition 'retract' can be performed or not
37
    """
38
    return analysis_guards.guard_retract(duplicate_analysis)
39