Fixes pour la mise à jour de mars (#598)

This commit is contained in:
Julien Constant
2023-04-04 22:50:19 +02:00
committed by Julien Constant
parent 8e7c025e47
commit f605f7dcc6
11 changed files with 69 additions and 12 deletions

View File

@ -46,6 +46,7 @@ from django.utils.html import escape
from django.utils.functional import cached_property
import os
from core import utils
from phonenumber_field.modelfields import PhoneNumberField
@ -296,6 +297,9 @@ class User(AbstractBaseUser):
USERNAME_FIELD = "username"
# REQUIRED_FIELDS = ['email']
def promo_has_logo(self):
return utils.file_exist("./core/static/core/img/promo_%02d.png" % self.promo)
def has_module_perms(self, package_name):
return self.is_active