Passed
Push — 2.x ( f1f812...47fbd3 )
by Jordi
05:06 queued 21s
created

senaite.core.browser.quickinstaller.quickinstaller   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 6
eloc 19
dl 0
loc 28
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B ManageProductsView.get_available() 0 17 6
1
# -*- coding: utf-8 -*-
2
3
from Products.CMFPlone.controlpanel.browser.quickinstaller import \
4
    ManageProductsView as BaseView
5
6
7
class ManageProductsView(BaseView):
8
    """
9
    """
10
11
    def get_available(self):
12
        """Available add-ons
13
        """
14
        available = []
15
        available_addons = self.get_addons(apply_filter="available").values()
16
        for addon in available_addons:
17
            id = addon.get("id")
18
            if id.startswith("plone."):
19
                continue
20
            elif id.startswith("Products."):
21
                continue
22
            elif id.startswith("collective."):
23
                continue
24
            elif id == "bika.lims":
25
                continue
26
            available.append(addon)
27
        return available
28