chore: build
Backend - Build & Lint / build (push) Canceled after 21m42s
Frontend Web - Build & Lint / build (push) Successful in 13m5s

This commit is contained in:
Xor290
2026-08-30 15:24:17 +02:00
parent 6fca16a58c
commit 42ed11bc22
3 changed files with 18 additions and 6 deletions
+7
View File
@@ -251,6 +251,13 @@ func (d *Database) UpdateSettings(s models.AppSettings) error {
return fmt.Errorf("erreur sérialisation pools: %w", err)
}
if s.PointsReward != nil {
for i := range s.PointsReward.CategoryConfigs {
if s.PointsReward.CategoryConfigs[i].Products == nil {
s.PointsReward.CategoryConfigs[i].Products = []models.RewardProductQuantity{}
}
}
}
rewardJSON, err := json.Marshal(s.PointsReward)
if err != nil {
return fmt.Errorf("erreur sérialisation points_reward: %w", err)