mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-30 19:52:20 +01:00
(bug) add a task for clean abuse notifications
This commit is contained in:
parent
acc081a413
commit
4c126a63d5
@ -1,6 +1,7 @@
|
|||||||
# Changelog Fab-manager
|
# Changelog Fab-manager
|
||||||
|
|
||||||
- Fix a bug: notification is broken when delete a project
|
- Fix a bug: notification is broken when delete a project
|
||||||
|
- [TODO DEPLOY] `rails fablab:maintenance:clean_abuse_notifications`
|
||||||
|
|
||||||
## v6.0.3 2023 April 12
|
## v6.0.3 2023 April 12
|
||||||
|
|
||||||
|
@ -155,5 +155,12 @@ namespace :fablab do
|
|||||||
end_date = args.end == 'today' ? Time.current.end_of_day : start_date.next_month
|
end_date = args.end == 'today' ? Time.current.end_of_day : start_date.next_month
|
||||||
[start_date, end_date]
|
[start_date, end_date]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc 'Clean the abuse notifications if signaled object is null'
|
||||||
|
task clean_abuse_notifications: :environment do
|
||||||
|
Abuse.all.each do |abuse|
|
||||||
|
abuse.destroy if abuse.signaled.nil?
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user