mirror of https://github.com/halo-dev/halo
refactor: clear the deprecated attributes value of post content when prePersist and preUpdate (#1797)
parent
ec6df79e7a
commit
7d9da09b49
|
@ -243,6 +243,17 @@ public class BasePost extends BaseEntity {
|
||||||
if (version == null || version < 0) {
|
if (version == null || version < 0) {
|
||||||
version = 1;
|
version = 1;
|
||||||
}
|
}
|
||||||
|
// Clear the value of the deprecated attributes
|
||||||
|
this.originalContent = "";
|
||||||
|
this.formatContent = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void preUpdate() {
|
||||||
|
super.preUpdate();
|
||||||
|
// Clear the value of the deprecated attributes
|
||||||
|
this.originalContent = "";
|
||||||
|
this.formatContent = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue