Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module sport results #394

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft

Module sport results #394

wants to merge 26 commits into from

Conversation

BLEMENT33
Copy link
Contributor

Description

Made a module to show sport results of all the sport teams to Centraliens

@@ -0,0 +1,183 @@
from collections.abc import Sequence
from sqlite3 import IntegrityError
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from sqlite3 import IntegrityError
from sqlalchemy.exc import IntegrityError

result.sport_id,
db,
):
raise HTTPException(status_code=401, detail="Not a captain")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
raise HTTPException(status_code=401, detail="Not a captain")
raise HTTPException(status_code=403, detail="Not a captain")

Comment on lines +106 to +208
result_complete = schemas_sport_results.ResultComplete(
id=str(uuid.uuid4()),
**result.model_dump(),
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to instantiate this intermediate variable?



class Sport(Base):
__tablename__ = "sports"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
__tablename__ = "sports"
__tablename__ = "sport_sport"



class Result(Base):
__tablename__ = "result"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
__tablename__ = "result"
__tablename__ = "sport_result"

@armanddidierjean armanddidierjean marked this pull request as draft April 22, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants