Skip to content

Commit 8c354f6

Browse files
committed
Lint and small fixes
1 parent 83c42f4 commit 8c354f6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

readthedocs/core/permissions.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# -*- coding: utf-8 -*-
22

33
"""Objects for User permission checks."""
4+
from django.contrib.auth.models import User
5+
from django.db.models import Q
46

57
from readthedocs.core.utils.extend import SettingsOverrideObject
68

@@ -13,7 +15,7 @@ def admins(cls, obj):
1315
from readthedocs.organizations.models import Organization
1416

1517
if isinstance(obj, Project):
16-
return project.users.all()
18+
return obj.users.all()
1719

1820
if isinstance(obj, Organization):
1921
return obj.owners.all()
@@ -24,7 +26,7 @@ def members(cls, obj):
2426
from readthedocs.organizations.models import Organization
2527

2628
if isinstance(obj, Project):
27-
return project.users.all()
29+
return obj.users.all()
2830

2931
if isinstance(obj, Organization):
3032
return User.objects.filter(

readthedocs/organizations/models.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from autoslug import AutoSlugField
44
from django.contrib.auth.models import User
55
from django.db import models
6-
from django.db.models import Q
76
from django.urls import reverse
87
from django.utils.crypto import salted_hmac
98
from django.utils.translation import ugettext_lazy as _

0 commit comments

Comments
 (0)