Skip to content

Commit

Permalink
fix(bug): cannot save challenge info
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Jul 18, 2023
1 parent ab5677a commit f145972
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GZCTF/Controllers/EditController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ public async Task<IActionResult> UpdateGameChallenge([FromRoute] int id, [FromRo

bool hintUpdated = model.IsHintUpdated(res.Hints?.GetSetHashCode());

if (res.Type == ChallengeType.DynamicContainer && !model.IsValidFlagTemplate())
if (model.FlagTemplate is not null && res.Type == ChallengeType.DynamicContainer && !model.IsValidFlagTemplate())
return BadRequest(new RequestResponse("flag 复杂度不足,请考虑添加队伍哈希或增加长度"));

res.Update(model);
Expand Down

0 comments on commit f145972

Please sign in to comment.