Skip to content

Commit

Permalink
(feat) clean ghost availabilities and slots
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainbx committed Feb 20, 2023
1 parent 3d2ccbf commit 1681dbd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Fix a bug: unable to start Fab-manager with message: maximum must be a nonnegative Integer
- Fix a bug: unable to export orders statistics
- Fix a bug: invalid shell coloring during setup
- [TODO DEPLOY] `fablab:maintenance:clean_availabilities`

## v5.7.0 2023 February 17

Expand Down
5 changes: 5 additions & 0 deletions lib/tasks/fablab/maintenance.rake
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ namespace :fablab do
puts '-> Done'
end

desc 'Remove ghost availabilities and slots'
task clean_availabilities: :environment do
Availability.where(available_type: 'unknown').destroy_all
end

def dates_from_args(args)
year = args.year || Time.current.year
month = args.month || Time.current.month
Expand Down

0 comments on commit 1681dbd

Please sign in to comment.