misc: do not use the ORM in Command.__init__ (#85699)
gitea/authentic/pipeline/head This commit looks good Details

This commit is contained in:
Benjamin Dauvergne 2024-01-15 17:51:00 +01:00
parent 9bdae8c033
commit 9bd5853ef1
1 changed files with 1 additions and 4 deletions

View File

@ -49,15 +49,12 @@ class Command(BaseCommand):
3: logging.DEBUG,
}
def __init__(self, stdout=None, stderr=None, no_color=False, force_color=False):
super().__init__(stdout=stdout, stderr=stderr, no_color=no_color, force_color=force_color)
self.is_phone_authn_active = get_password_authenticator().is_phone_authn_active
def add_arguments(self, parser):
parser.add_argument('--fake', action='store_true', help='do nothing', default=False)
def handle(self, *args, **options):
self.fake = options['fake']
self.is_phone_authn_active = get_password_authenticator().is_phone_authn_active
# add StreamHandler for console output
handler = logging.StreamHandler()