mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-09 03:08:05 +02:00
Fix a couple of issues with a feeds (#14897)
@CirnoT spotted a couple of issues with feeds on discord. This PR fixes both of these.
This commit is contained in:
1 parent
fd4b309c6f
commit
20f13bfdfc
2 files changed
+6
-1
No files matched your search
@@ -817,6 +817,10 @@ func ActionIcon(opType models.ActionType) string {
|
||||
func ActionContent2Commits(act Actioner) *repository.PushCommits {
|
||||
push := repository.NewPushCommits()
|
||||
|
||||
if act == nil || act.GetContent() == "" {
|
||||
return push
|
||||
}
|
||||
|
||||
json := jsoniter.ConfigCompatibleWithStandardLibrary
|
||||
if err := json.Unmarshal([]byte(act.GetContent()), push); err != nil {
|
||||
log.Error("json.Unmarshal:\n%s\nERROR: %v", act.GetContent(), err)
|
||||
|
||||
Reference in new issue
Block a user