Completed
Push — master ( ac8e27...9493cd )
by -
01:40
created

NaxsiWhitelistSets.__init__()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.4218
Metric Value
dl 0
loc 4
ccs 1
cts 4
cp 0.25
rs 10
cc 1
crap 1.4218
1 1
from spike.model import db
2
3
4 1
class NaxsiWhitelistSets(db.Model):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
5 1
    __bind_key__ = 'rules'
6 1
    __tablename__ = 'naxsi_whitelistsets'
7
8 1
    id = db.Column(db.Integer, primary_key=True)
9 1
    name = db.Column(db.String(1024), nullable=False, unique=True)
10 1
    remarks = db.Column(db.Text, nullable=False)
11 1
    timestamp = db.Column(db.Integer, nullable=False)
12 1
    db.UniqueConstraint('name')
13
14 1
    def __init__(self, name, remarks, timestamp):
15
        self.name = name
16
        self.remarks = remarks
17
        self.timestamp = timestamp
18