forked from 0x2620/pandora
update db if guest was reclassified as robot
This commit is contained in:
parent
680efc967c
commit
3913373c9b
2 changed files with 4 additions and 2 deletions
|
@ -37,7 +37,6 @@ def parseCondition(condition, user):
|
|||
else:
|
||||
key = k + get_operator(op, 'istr')
|
||||
key = str(key)
|
||||
|
||||
q = Q(**{key: v})
|
||||
if exclude:
|
||||
q = ~q
|
||||
|
|
|
@ -141,6 +141,9 @@ class SessionData(models.Model):
|
|||
|
||||
def json(self, keys=None, user=None):
|
||||
ua = ox.parse_useragent(self.useragent or '')
|
||||
if ua['robot']['name'] and self.level != -1:
|
||||
self.level = -1
|
||||
self.save()
|
||||
j = {
|
||||
'browser': ua['browser']['string'],
|
||||
'disabled': False,
|
||||
|
|
Loading…
Reference in a new issue