From 03e5507363d9f2c1200c964687a5e603414423bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Calzado?= Date: Mon, 18 Oct 2021 17:08:19 +0200 Subject: [PATCH 1/3] Fix notification when seats limit is reached --- app/models/carto/organization.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/carto/organization.rb b/app/models/carto/organization.rb index ac2bc1fe41..d7c18f7dc8 100644 --- a/app/models/carto/organization.rb +++ b/app/models/carto/organization.rb @@ -140,7 +140,7 @@ module Carto end def notify_if_seat_limit_reached - ::Resque.enqueue(::Resque::OrganizationJobs::Mail::SeatLimitReached, id) if will_reach_seat_limit? + ::Resque.enqueue(::Resque::OrganizationJobs::Mail::SeatLimitReached, id) if reached_seats_limit? end def database_name @@ -249,8 +249,8 @@ module Carto assets.map { |asset| Carto::Asset.find(asset.id) }.map(&:destroy).all? end - def will_reach_seat_limit? - remaining_seats <= 1 + def reached_seats_limit? + remaining_seats < 1 end def authentication_methods_available From d749f337585e0672ba20b68dbd6e80f5651591bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Calzado?= Date: Mon, 18 Oct 2021 17:11:18 +0200 Subject: [PATCH 2/3] Update NEWS.md --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 01b7e8ab96..7c7463c964 100644 --- a/NEWS.md +++ b/NEWS.md @@ -67,6 +67,7 @@ Development - Fix scrolling on widget's sidebar in builder [#16350](https://github.com/CartoDB/cartodb/pull/16350) - Fix Auth URL generation while establishing a connection with Google Drive [#16357](https://github.com/CartoDB/cartodb/pull/16357) - Fix adding license metadata to a dataset [#16356](https://github.com/CartoDB/cartodb/pull/16356) +- Fix notifications when organization seats limit is reached [#16359](https://github.com/CartoDB/cartodb/pull/16359) 4.45.0 (2021-04-14) -------------------