lifecycle: fix migration trying to load all classes
This commit is contained in:
@ -25,7 +25,8 @@ delete from django_migrations where app = 'passbook_stages_password' and
|
||||
name = '0002_passwordstage_change_flow';"""
|
||||
|
||||
|
||||
class To010Migration(BaseMigration):
|
||||
class Migration(BaseMigration):
|
||||
|
||||
def needs_migration(self) -> bool:
|
||||
self.cur.execute(
|
||||
"select * from information_schema.tables where table_name='oidc_provider_client'"
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
from pickle import loads # nosec
|
||||
from pickle import loads
|
||||
from typing import Any # nosec
|
||||
|
||||
from redis import Redis
|
||||
|
||||
@ -6,8 +7,10 @@ from lifecycle.migrate import BaseMigration
|
||||
from passbook.lib.config import CONFIG
|
||||
|
||||
|
||||
class To012Migration(BaseMigration):
|
||||
def __init__(self) -> None:
|
||||
class Migration(BaseMigration):
|
||||
|
||||
def __init__(self, cur: Any, con: Any):
|
||||
super().__init__(cur, con)
|
||||
self.redis = Redis(
|
||||
host=CONFIG.y("redis.host"),
|
||||
port=6379,
|
||||
|
||||
Reference in New Issue
Block a user