-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: main
Are you sure you want to change the base?
Module sport results #394
Conversation
@@ -0,0 +1,183 @@ | |||
from collections.abc import Sequence | |||
from sqlite3 import IntegrityError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from sqlite3 import IntegrityError | |
from sqlalchemy.exc import IntegrityError |
result.sport_id, | ||
db, | ||
): | ||
raise HTTPException(status_code=401, detail="Not a captain") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise HTTPException(status_code=401, detail="Not a captain") | |
raise HTTPException(status_code=403, detail="Not a captain") |
result_complete = schemas_sport_results.ResultComplete( | ||
id=str(uuid.uuid4()), | ||
**result.model_dump(), | ||
) |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__tablename__ = "sports" | |
__tablename__ = "sport_sport" |
|
||
|
||
class Result(Base): | ||
__tablename__ = "result" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__tablename__ = "result" | |
__tablename__ = "sport_result" |
bcc220a
to
5e36580
Compare
Description
Made a module to show sport results of all the sport teams to Centraliens