mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
Fix a bug: when getting status of users/subscriptions export
This commit is contained in:
parent
9024bf0643
commit
3d2169634c
@ -5,6 +5,7 @@
|
||||
- Fix a bug: minor pb (exception raised) when bot hit api/projects#search without beeing authenticated
|
||||
- Fix a bug: minor pb (exception raised) when a bot or unauthenticated user hit api/auth_providers actions
|
||||
- Fix a bug: when calling .to_json on an "avoir", there was a bug because order_number delegates on invoice which can be nil, it was causing errors in notifications rendering
|
||||
- Fix a bug: when getting status of users/subscriptions export
|
||||
|
||||
## v6.1.1 2023 September 28
|
||||
|
||||
|
@ -67,7 +67,7 @@ class API::MembersController < API::APIController
|
||||
def export_subscriptions
|
||||
authorize :export
|
||||
|
||||
export = ExportService.last_export('users/subscription')
|
||||
export = ExportService.last_export('users/subscriptions')
|
||||
if export.nil? || !FileTest.exist?(export.file)
|
||||
@export = Export.new(category: 'users', export_type: 'subscriptions', user: current_user)
|
||||
if @export.save
|
||||
|
@ -10,7 +10,7 @@ class ExportService
|
||||
last_export_members(query, key, extension)
|
||||
when 'users/reservations'
|
||||
last_export_reservations(query, key, extension)
|
||||
when 'users/subscription'
|
||||
when 'users/subscriptions'
|
||||
last_export_subscriptions(query, key, extension)
|
||||
when 'availabilities/index'
|
||||
last_export_availabilities(query, key, extension)
|
||||
@ -19,7 +19,7 @@ class ExportService
|
||||
when %r{statistics/.*}
|
||||
last_export_statistics(type, query, key, extension)
|
||||
else
|
||||
raise TypeError "unknown export type: #{type}"
|
||||
raise TypeError.new("unknown export type: #{type}")
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user