fix prospector/isort errors
This commit is contained in:
parent
a4707ddc54
commit
c1640b9411
|
@ -1,13 +1,13 @@
|
|||
"""passbook audit models"""
|
||||
from logging import getLogger
|
||||
|
||||
from ipware import get_client_ip
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.contrib.postgres.fields import JSONField
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext as _
|
||||
from ipware import get_client_ip
|
||||
|
||||
from passbook.lib.models import UUIDModel
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
"""passbook core policy engine"""
|
||||
from logging import getLogger
|
||||
|
||||
from ipware import get_client_ip
|
||||
from celery import group
|
||||
from django.http import HttpRequest
|
||||
from ipware import get_client_ip
|
||||
|
||||
from passbook.core.celery import CELERY_APP
|
||||
from passbook.core.models import Policy, User
|
||||
|
@ -62,7 +61,7 @@ class PolicyEngine:
|
|||
if self._request:
|
||||
kwargs['remote_ip'], _ = get_client_ip(self._request)
|
||||
if not kwargs['remote_ip']:
|
||||
kwargs['remote_ip'] = '255.255.255.255',
|
||||
kwargs['remote_ip'] = '255.255.255.255'
|
||||
for policy in self.policies:
|
||||
signatures.append(_policy_engine_task.s(self._user.pk, policy.pk.hex, **kwargs))
|
||||
self._group = group(signatures)()
|
||||
|
|
Reference in a new issue