Bug 31937: Fix Patrons::search_unsubscribed - sharpen condition
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 26 Oct 2022 15:00:53 +0000 (15:00 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 17 Nov 2022 16:41:24 +0000 (13:41 -0300)
commit25a4757373b0f00df45b99bac76079ccbf20777e
tree91544779367c68d7821c9477ef44fe3722e179f2
parenta711e153d61f3ed9d9d0d214105e8c173a9486ca
Bug 31937: Fix Patrons::search_unsubscribed - sharpen condition

The condition is fine as long as we only have GDPR consents.
But if you dont, you would have trouble. I know :)
Lets prevent that here, although the table still has an ENUM. So
double safety.

Test plan:
Run t/db_dependent/Koha/Patrons.t
Bonus: Run cleanup_database.pl and check for unusual number of
locked accounts:
     misc/cronjobs/cleanup_database.pl --confirm -v --sessions

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Patrons.pm