PEP fixes

This commit is contained in:
Oliver Walters 2020-10-06 11:31:04 +11:00
parent dc2c9aa662
commit c740cce5e4
2 changed files with 3 additions and 7 deletions

View File

@ -22,7 +22,7 @@ from django.views.generic.base import TemplateView
from part.models import Part, PartCategory
from stock.models import StockLocation, StockItem
from common.models import InvenTreeSetting, ColorTheme
from users.models import check_user_role, RuleSet
from users.models import check_user_role
from .forms import DeleteForm, EditUserForm, SetPasswordForm, ColorThemeSelectForm
from .helpers import str2bool
@ -715,9 +715,6 @@ class InvenTreeRoleMixin(PermissionRequiredMixin):
elif type(self.role_required) in [list, tuple]:
roles_required = self.role_required
# List of permissions that will be required
permissions = []
user = self.request.user
# Superuser can have any permissions they desire

View File

@ -53,7 +53,6 @@ class PartIndex(InvenTreeRoleMixin, ListView):
role_required = 'part.view'
def get_queryset(self):
return Part.objects.all().select_related('category')