diff --git a/app/app.py b/app/app.py index 7189b361f..8d0e2f2ff 100644 --- a/app/app.py +++ b/app/app.py @@ -205,14 +205,14 @@ def initialize_schools( db_school = models_core.CoreSchool( id=school.value, name=school.name, - email_regex=".*", + email_regex="null", ) try: initialization.create_school_sync(school=db_school, db=db) except IntegrityError as error: hyperion_error_logger.fatal( - f"Startup: Could not add group {db_school.name}<{db_school.id}> in the database: {error}", + f"Startup: Could not add school {db_school.name}<{db_school.id}> in the database: {error}", ) diff --git a/app/core/models_core.py b/app/core/models_core.py index 670b6566c..3de3827f3 100644 --- a/app/core/models_core.py +++ b/app/core/models_core.py @@ -129,8 +129,8 @@ class CoreSchool(Base): __tablename__ = "core_school" id: Mapped[PrimaryKey] - name: Mapped[str] = mapped_column(String, unique=True) - email_regex: Mapped[str] = mapped_column(String) + name: Mapped[str] = mapped_column(unique=True) + email_regex: Mapped[str] class CoreAssociationMembership(Base):