Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
chore: fix setting nil checks
Stevenf28b65405706
diff --git a/api/v2/memo_service.go b/api/v2/memo_service.goindex fa190a4e1..63122a495 100644--- a/api/v2/memo_service.go+++ b/api/v2/memo_service.go@@ -590,6 +590,10 @@ func (s *APIV2Service) getMemoDisplayWithUpdatedTsSettingValue(ctx context.Conteif err != nil {return false, errors.Wrap(err, "failed to find system setting")}+ if memoDisplayWithUpdatedTsSetting == nil {+ return false, nil+ }+memoDisplayWithUpdatedTs := falseif memoDisplayWithUpdatedTsSetting != nil {err = json.Unmarshal([]byte(memoDisplayWithUpdatedTsSetting.Value), &memoDisplayWithUpdatedTs)@@ -607,6 +611,10 @@ func (s *APIV2Service) getDisablePublicMemosSystemSettingValue(ctx context.Conteif err != nil {return false, errors.Wrap(err, "failed to find system setting")}+ if disablePublicMemosSystemSetting == nil {+ return false, nil+ }+disablePublicMemos := falseerr = json.Unmarshal([]byte(disablePublicMemosSystemSetting.Value), &disablePublicMemos)if err != nil {