From 3e1ba6d1837f4e299e8a213ba3c6ea8755f58756 Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Fri, 29 Aug 2025 10:43:49 +0200 Subject: [PATCH] Update changelog --- CHANGELOG.md | 6 ++++++ app/models/user.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71010b06..5854fb91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +# [UNRELEASED] + +## Fixed + +- Default value for `points_count` attribute is now set to 0 in the User model. + # [0.30.12] - 2025-08-26 ## Fixed diff --git a/app/models/user.rb b/app/models/user.rb index bb80f3f0..96d3e3a7 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -118,7 +118,7 @@ class User < ApplicationRecord # rubocop:disable Metrics/ClassLength end def trial_state? - points_count.zero? && trial? + (points_count || 0).zero? && trial? end private