Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-10-13 21:50:28 +08:00
commit 0c4aee7388
3 changed files with 11 additions and 3 deletions

View file

@ -521,7 +521,11 @@ func SaveAttributeView(av *AttributeView) (err error) {
for _, v := range kv.Values {
if 0 == v.Block.Created {
if "" == v.Block.ID {
v.Block.ID = ast.NewNodeID()
v.Block.ID = v.BlockID
if "" == v.Block.ID {
v.Block.ID = ast.NewNodeID()
v.BlockID = v.Block.ID
}
}
createdStr := v.Block.ID[:len("20060102150405")]

View file

@ -191,7 +191,11 @@ func RenderAttributeView(avID string) (viewable av.Viewable, attrView *av.Attrib
for _, v := range kv.Values {
if 0 == v.Block.Created {
if "" == v.Block.ID {
v.Block.ID = ast.NewNodeID()
v.Block.ID = v.BlockID
if "" == v.Block.ID {
v.Block.ID = ast.NewNodeID()
v.BlockID = v.Block.ID
}
}
createdStr := v.Block.ID[:len("20060102150405")]

View file

@ -74,7 +74,7 @@ func SetPetalEnabled(name string, enabled bool, frontend string) (ret *Petal, er
func LoadPetals(frontend string) (ret []*Petal) {
ret = []*Petal{}
if Conf.Bazaar.PetalDisabled {
if Conf.Bazaar.PetalDisabled || !Conf.Bazaar.Trust {
return
}