forked from DGNum/gestioCOF
fewer calls on account_read view
This commit is contained in:
parent
c9019c4eb4
commit
56fa70e495
1 changed files with 5 additions and 1 deletions
|
@ -351,7 +351,11 @@ def account_create_ajax(request, username=None, login_clipper=None,
|
|||
@login_required
|
||||
def account_read(request, trigramme):
|
||||
try:
|
||||
account = Account.objects.select_related('negative').get(trigramme=trigramme)
|
||||
account = (
|
||||
Account.objects
|
||||
.select_related('cofprofile__user', 'negative')
|
||||
.get(trigramme=trigramme)
|
||||
)
|
||||
except Account.DoesNotExist:
|
||||
raise Http404
|
||||
|
||||
|
|
Loading…
Reference in a new issue