Skip to content

Commit

Permalink
Merge pull request #33 from WizzyGeek/dev-round2
Browse files Browse the repository at this point in the history
disgrace commit: 1
  • Loading branch information
WizzyGeek authored Jan 29, 2024
2 parents 1ee7d31 + c8b2281 commit 05d9034
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pwncore/routes/ctf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async def flag_post(
if not team_container:
return {"msg_code": config.msg_codes["container_not_found"]}

if team_container.flag == flag.flag:
if team_container.flag == flag.flag.strip():
hints = await Hint.filter(
problem_id=ctf_id,
viewedhints__team_id=team_id,
Expand Down
2 changes: 1 addition & 1 deletion src/pwncore/routes/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def get_self_team(jwt: RequireJwt):
team_model = await Team.get(id=team_id).prefetch_related("meta_team")

team = dict(await Team_Pydantic.from_tortoise_orm(team_model))
team["meta_team__name"] = team_model.meta_team.name # type: ignore[arg-type, union-attr]
team["meta_team__name"] = getattr(team_model.meta_team, "name", None)
# Get points from leaderboard
# would be better is cache stores the values in a dict indexed by team id
# for leaderboard_team in gcache.data:
Expand Down

0 comments on commit 05d9034

Please sign in to comment.