From a01b98f43fc7e6fc2774f892741ba7b96a7031cc Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Tue, 10 Jul 2018 23:36:01 +0200 Subject: [PATCH] Imports corrects --- users/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/users/views.py b/users/views.py index 05e77372..083a3f3f 100644 --- a/users/views.py +++ b/users/views.py @@ -51,7 +51,7 @@ from reversion import revisions as reversion from cotisations.models import Facture, Paiement from machines.models import Machine -from preferences.models import GeneralOption +from preferences.models import OptionalUser, GeneralOption, AssoOption from re2o.views import form from re2o.utils import ( all_has_access, @@ -985,8 +985,7 @@ def profil(request, users, **_kwargs): 'ban_list': bans, 'white_list': whitelists, 'user_solde': user_solde, - 'allow_online_payment': allow_online_payment, - 'solde_activated': OptionalUser.objects.first().user_solde, + 'solde_activated': Paiement.objects.filter(is_balance=True).exists(), 'asso_name': AssoOption.objects.first().name, 'alias_list': users.mailalias_set.all(), 'mail_accounts': OptionalUser.objects.first().mail_accounts