Passed
Push — master ( bcbb8c...8785a0 )
by Jordi
05:37 queued 01:13
created

bika.lims.browser.worksheet.views.add_control.AddControlView.getAvailablePositions()   A

Complexity

Conditions 2

Size

Total Lines 11
Code Lines 8

Duplication

Lines 11
Ratio 100 %

Importance

Changes 0
Metric Value
eloc 8
dl 11
loc 11
rs 10
c 0
b 0
f 0
cc 2
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 bika.lims import bikaMessageFactory as _
9
from referencesamples import ReferenceSamplesView
10
11
12 View Code Duplication
class AddControlView(ReferenceSamplesView):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13
    """Displays reference control samples
14
    """
15
16
    def __init__(self, context, request):
17
        super(AddControlView, self).__init__(context, request)
18
19
        self.contentFilter = {
20
            "portal_type": "ReferenceSample",
21
            "getSupportedServices": self.get_assigned_services_uids(),
22
            "isValid": True,
23
            "getBlank": False,
24
            "review_state": "current",
25
            "inactive_state": "active",
26
            "sort_on": "sortable_title",
27
            "sort_order": "ascending",
28
        }
29
        self.title = _("Add Control Reference")
30