Passed
Push — master ( fdcd73...e5d86d )
by Jordi
11:48 queued 08:07
created

bika.lims.subscribers.objectadded   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A auto_generate_id() 0 5 1
1
# -*- coding: utf-8 -*-
2
#
3
# This file is part of SENAITE.CORE
4
#
5
# Copyright 2018 by it's authors.
6
7
from bika.lims.idserver import renameAfterCreation
8
from bika.lims import logger
9
10
11
def auto_generate_id(obj, event):
12
    """Generate ID with the IDServer from senaite.core
13
    """
14
    logger.info("Auto-Generate ID for {}".format(repr(obj)))
15
    renameAfterCreation(obj)
16