mirror of https://github.com/halo-dev/halo
fix: leak of version number inference when create or update content patch (#1690)
parent
4f1a3c5f0b
commit
4d71185066
|
@ -70,7 +70,8 @@ public class ContentPatchLogServiceImpl implements ContentPatchLogService {
|
|||
if (latestPatchLog == null) {
|
||||
// There is no patchLog record
|
||||
version = 1;
|
||||
} else if (PostStatus.PUBLISHED.equals(latestPatchLog.getStatus())) {
|
||||
} else if (PostStatus.PUBLISHED.equals(latestPatchLog.getStatus())
|
||||
|| PostStatus.INTIMATE.equals(latestPatchLog.getStatus())) {
|
||||
// There is no draft, a draft record needs to be created
|
||||
// so the version number needs to be incremented
|
||||
version = latestPatchLog.getVersion() + 1;
|
||||
|
|
Loading…
Reference in New Issue