mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
fix: postprocessing for alias keys not corresponding to an actual entity
This commit is contained in:
parent
c2d30826f6
commit
68e66298b8
@ -189,6 +189,14 @@ func (srv *SummaryService) PostProcess(summary *models.Summary) *models.Summary
|
|||||||
if key, _ := srv.AliasService.GetAliasOrDefault(summary.UserID, item.Type, item.Key); key != item.Key {
|
if key, _ := srv.AliasService.GetAliasOrDefault(summary.UserID, item.Type, item.Key); key != item.Key {
|
||||||
if targetItem := findItem(key); targetItem != nil {
|
if targetItem := findItem(key); targetItem != nil {
|
||||||
targetItem.Total += item.Total
|
targetItem.Total += item.Total
|
||||||
|
} else {
|
||||||
|
target = append(target, &models.SummaryItem{
|
||||||
|
ID: item.ID,
|
||||||
|
SummaryID: item.SummaryID,
|
||||||
|
Type: item.Type,
|
||||||
|
Key: key,
|
||||||
|
Total: item.Total,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
1.13.1
|
1.13.2
|
||||||
|
Loading…
Reference in New Issue
Block a user