Changed accoutn comparaison from id to equality

This commit is contained in:
Dorian Lesbre 2021-02-19 10:26:05 +01:00
parent 89fc309c01
commit b97bc8bfa8

View file

@ -1488,7 +1488,7 @@ def history_json(request):
transfergroups = TransferGroup.objects.none()
if account:
opegroups = opegroups.filter(on_acc=account)
if account.cofprofile.user.id == request.user.id:
if account == request.user.profile.account_kfet:
limit_date = False # pas de limite de date sur son propre historique
# Un non-membre de l'équipe n'a que accès à son historique
elif not request.user.has_perm("kfet.is_team"):