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

auto_generate_id()   A

Complexity

Conditions 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nop 2
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