Skip to content

Commit

Permalink
Merge pull request #208 from Bilonan/get_user
Browse files Browse the repository at this point in the history
Import get_user_model instead User model from django.contrib.auth in history view
  • Loading branch information
BBooijLiewes authored Feb 18, 2022
2 parents 845dbff + 482f0a8 commit 77eca30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions binder/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from django.db import models
from django.http import HttpResponse
from django.contrib.auth.models import User
from django.contrib.auth import get_user_model
from django.conf import settings
from django.dispatch import Signal

Expand Down Expand Up @@ -214,7 +214,7 @@ def view_changesets(request, changesets):
userids.add(cs.user_id)

users = []
for u in User.objects.filter(id__in=userids):
for u in get_user_model().objects.filter(id__in=userids):
users.append({'id': u.id, 'username': u.username, 'email': u.email, 'first_name': u.first_name, 'last_name': u.last_name})

return JsonResponse({'data': data, 'with': {'user': users}})
Expand Down

0 comments on commit 77eca30

Please sign in to comment.