Passed
Push — 2.x ( 5ff915...047977 )
by Jordi
06:19
created

on_client_created()   A

Complexity

Conditions 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 2
nop 2
1
# -*- coding: utf-8 -*-
2
3
from senaite.core.registry import get_registry_record
4
5
6
def on_client_created(client, event):
7
    """Event handler when a new Client was created
8
    """
9
    if get_registry_record("auto_create_client_group", True):
10
        # create a new client group
11
        client.create_group()
12