Skip to content

Commit

Permalink
fix: can not empty post tags (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Sep 22, 2023
1 parent b8da2bc commit d0b2864
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/GZCTF/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@mdi/js": "^7.2.96",
"@mdi/react": "^1.6.1",
"@microsoft/signalr": "^7.0.11",
"dayjs": "^1.11.9",
"dayjs": "^1.11.10",
"echarts": "^5.4.3",
"echarts-for-react": "^3.0.2",
"embla-carousel": "^7.1.0",
Expand All @@ -51,7 +51,7 @@
"@nabla/vite-plugin-eslint": "^1.5.0",
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@types/katex": "^0.16.3",
"@types/node": "20.6.2",
"@types/node": "20.6.3",
"@types/prismjs": "^1.26.0",
"@types/react": "^18.2.22",
"@types/react-dom": "^18.2.7",
Expand Down
38 changes: 19 additions & 19 deletions src/GZCTF/ClientApp/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/GZCTF/Models/Data/Post.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ internal Post Update(PostEditModel model, UserInfo user)
Summary = string.IsNullOrEmpty(model.Summary) ? Summary : model.Summary;
Content = string.IsNullOrEmpty(model.Content) ? Content : model.Content;
IsPinned = model.IsPinned;
Tags = model.Tags.Length > 0 ? model.Tags.ToList() : Tags;
Tags = model.Tags.ToList();
Author = user;
AuthorId = user.Id;
UpdateTimeUTC = DateTimeOffset.UtcNow;
Expand Down

0 comments on commit d0b2864

Please sign in to comment.