Skip to content

Commit

Permalink
Merge pull request #638 from akvo/hotfix/612_tastypie_auth
Browse files Browse the repository at this point in the history
[#612] Replace User with get_user_model() in yet another place
  • Loading branch information
KasperBrandt committed Jun 18, 2014
2 parents e6a247c + 43b6b9f commit 15cd9ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions akvo/api/resources/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.


from django.contrib.auth.models import User
from django.contrib.auth import get_user_model

from tastypie.authentication import ApiKeyAuthentication
from tastypie.constants import ALL_WITH_RELATIONS, ALL
Expand All @@ -23,7 +23,7 @@ class UserResource(ConditionalFullResource):
class Meta:
authentication = ApiKeyAuthentication()
allowed_methods = ['get']
queryset = User.objects.filter(is_active=True)
queryset = get_user_model().objects.filter(is_active=True)
resource_name = 'user'
fields = ['username', 'first_name', 'last_name', 'last_login',]
filtering = dict(
Expand Down

0 comments on commit 15cd9ce

Please sign in to comment.