1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

[bug] unable to search in user autocomplete

This commit is contained in:
Sylvain 2019-01-21 09:42:51 +01:00
parent 65892684a8
commit c4b3c1eab5
2 changed files with 3 additions and 2 deletions

View File

@ -8,6 +8,7 @@
- Fix a bug: rails DSB locale is invalid
- Fix a bug: unable to delete an admin who has changed a setting
- Fix a bug: unable to create/edit a plan of 12 months or 52 weeks
- Fix a bug: Unable to search in user autocomplete fields
- Refactored frontend invoices translations
- Updated RailRoady 1.4.0 to 1.5.3

View File

@ -232,9 +232,9 @@ class API::MembersController < API::ApiController
else
# only admins have the ability to filter by subscription
if params[:subscription] === 'true'
@members = @members.where('subscriptions.id IS NOT NULL AND subscriptions.expired_at >= :now', now: Date.today.to_s)
@members = @members.where('subscriptions.id IS NOT NULL AND subscriptions.expiration_date >= :now', now: Date.today.to_s)
elsif params[:subscription] === 'false'
@members = @members.where('subscriptions.id IS NULL OR subscriptions.expired_at < :now', now: Date.today.to_s)
@members = @members.where('subscriptions.id IS NULL OR subscriptions.expiration_date < :now', now: Date.today.to_s)
end
end