mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
(bug) unable to filter by date in the Subscription OpenAPI
This commit is contained in:
parent
84f83564bc
commit
5f917ec1e8
@ -5,6 +5,7 @@
|
||||
- Fix a bug: unable to show Fabmanager network project picture
|
||||
- Fix a bug: availability slot date error in calendar when user pc timezone is different from server timezone
|
||||
- Fix a bug: expiration_date of a subscription is not correct in the OpenAPI
|
||||
- Fix a bug: unable to filter by date in the Subscription OpenAPI
|
||||
|
||||
## v6.3.20 2024 Avril 15
|
||||
|
||||
|
@ -10,7 +10,7 @@ module OpenAPI::V1::Concerns::SubscriptionsFiltersConcern
|
||||
def filter_by_after(subscriptions, filters)
|
||||
return subscriptions if filters[:after].blank?
|
||||
|
||||
subscriptions.where('created_at >= ?', Time.zone.parse(filters[:after]))
|
||||
subscriptions.where('subscriptions.created_at >= ?', Time.zone.parse(filters[:after]))
|
||||
end
|
||||
|
||||
# @param subscriptions [ActiveRecord::Relation<Subscription>]
|
||||
@ -18,7 +18,7 @@ module OpenAPI::V1::Concerns::SubscriptionsFiltersConcern
|
||||
def filter_by_before(subscriptions, filters)
|
||||
return subscriptions if filters[:before].blank?
|
||||
|
||||
subscriptions.where('created_at <= ?', Time.zone.parse(filters[:before]))
|
||||
subscriptions.where('subscriptions.created_at <= ?', Time.zone.parse(filters[:before]))
|
||||
end
|
||||
|
||||
# @param subscriptions [ActiveRecord::Relation<Subscription>]
|
||||
|
Loading…
Reference in New Issue
Block a user