Skip to content

Commit f1af46a

Browse files
authored
Remove ffsu scrapper (#859)
## Description ### Summary <!--Brief description of what this PR does.--> ### Related Issues <!-- If applicable --> Closes #<!--0--> ## Changes Made <!--Please describe the changes made in this pull request--> - ... ## Type of Change - [ ] 🐛 Bug fix (non-breaking change which fixes an issue) - [ ] ✨ New feature (non-breaking change which adds functionality) - [x] 🔨 Refactor (non-breaking change that neither fixes a bug nor adds a feature) - [ ] 🔧 Infra CI/CD (changes to configs of workflows) - [ ] 💥 BREAKING CHANGE (fix or feature that require a new minimal version of the front-end) ## Impact & Scope - [ ] Core functionality changes - [x] Single module changes - [ ] Multiple modules changes - [ ] Database migrations required - [ ] Other ## Testing - [x] Added/modified tests that pass the CI - [ ] Tested in a pre-prod - [ ] Tested this locally ## Documentation - [ ] Updated docs accordingly (docs.myecl.fr) : <!--[Docs#0 - Title](https://github.com/aeecleclair/myecl-documentation/pull/0)--> - [ ] Code includes docstrings - [x] No documentation needed ## Checklist - [x] My code follows the style guidelines of this project - [x] I have commented my code, particularly in hard-to-understand areas - [x] Any dependent changes have been merged and published (_Indicate the linked PR for the dependent changes_) ## Additional Notes Add any other context, screenshots, or information about the pull request here.
1 parent 5ff42fd commit f1af46a

18 files changed

+47
-120
lines changed

app/modules/sport_competition/cruds_sport_competition.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,6 @@ async def add_school(
465465
models_sport_competition.SchoolExtension(
466466
school_id=school.school_id,
467467
from_lyon=school.from_lyon,
468-
ffsu_id=school.ffsu_id,
469468
active=school.active,
470469
inscription_enabled=school.inscription_enabled,
471470
),
@@ -509,7 +508,6 @@ async def load_school_base_by_id(
509508
from_lyon=school.from_lyon,
510509
active=school.active,
511510
inscription_enabled=school.inscription_enabled,
512-
ffsu_id=school.ffsu_id,
513511
)
514512
if school
515513
else None

app/modules/sport_competition/endpoints_sport_competition.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
CompetitionGroupType,
2626
ProductSchoolType,
2727
)
28-
from app.modules.sport_competition.utils.ffsu_scrapper import (
29-
validate_participant_ffsu_license,
30-
)
3128
from app.modules.sport_competition.utils_sport_competition import (
3229
check_validation_consistency,
3330
checksport_category_compatibility,
@@ -1981,21 +1978,15 @@ async def join_sport(
19811978
name=f"{user.user.firstname} {user.user.name} - {school.school.name}",
19821979
)
19831980
await cruds_sport_competition.add_team(new_team, db)
1984-
is_license_valid = False
1985-
if participant_info.license:
1986-
is_license_valid = validate_participant_ffsu_license(
1987-
school,
1988-
user,
1989-
participant_info.license,
1990-
)
1981+
19911982
participant = schemas_sport_competition.Participant(
19921983
user_id=user.user_id,
19931984
sport_id=sport_id,
19941985
edition_id=edition.id,
19951986
school_id=user.user.school_id,
19961987
license=participant_info.license,
19971988
substitute=participant_info.substitute,
1998-
is_license_valid=is_license_valid,
1989+
is_license_valid=False,
19991990
team_id=participant_info.team_id or new_team.id,
20001991
created_at=datetime.now(UTC),
20011992
)

app/modules/sport_competition/models_sport_competition.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ class SchoolExtension(Base):
8989
school_id: Mapped[PrimaryKey] = mapped_column(
9090
ForeignKey("core_school.id"),
9191
)
92-
ffsu_id: Mapped[str | None]
9392
from_lyon: Mapped[bool]
9493
active: Mapped[bool]
9594
inscription_enabled: Mapped[bool]

app/modules/sport_competition/schemas_sport_competition.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ class CompetitionEditionEdit(BaseModel):
3737
class SchoolExtensionBase(BaseModel):
3838
school_id: UUID
3939
from_lyon: bool
40-
ffsu_id: str | None = None
4140
active: bool = True
4241
inscription_enabled: bool = False
4342

@@ -48,7 +47,6 @@ class SchoolExtension(SchoolExtensionBase):
4847

4948
class SchoolExtensionEdit(BaseModel):
5049
from_lyon: bool | None = None
51-
ffsu_id: str | None = None
5250
active: bool | None = None
5351
inscription_enabled: bool | None = None
5452

app/modules/sport_competition/utils/ffsu_scrapper.py

Lines changed: 0 additions & 84 deletions
This file was deleted.

app/modules/sport_competition/utils/schemas_converters.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def school_extension_model_to_schema(
4848
from_lyon=school_extension.from_lyon,
4949
active=school_extension.active,
5050
inscription_enabled=school_extension.inscription_enabled,
51-
ffsu_id=school_extension.ffsu_id,
5251
school=schemas_schools.CoreSchool(
5352
id=school_extension.school.id,
5453
name=school_extension.school.name,

0 commit comments

Comments
 (0)