mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
Fix a bug: public availabilities (no user) was buggy (server error)
This commit is contained in:
parent
fe1b555990
commit
73f30de587
@ -3,6 +3,7 @@
|
||||
## next release
|
||||
|
||||
- Fix a bug: unable to sync projects with openprojects
|
||||
- Fix a bug: public availabilities (no user) was buggy (server error)
|
||||
|
||||
- [TODO DEPLOY] `rails fablab:openlab:bulk_export`
|
||||
- [TODO DEPLOY] `rails fablab:openlab:bulk_update`
|
||||
|
@ -141,7 +141,7 @@ class Availabilities::AvailabilitiesService
|
||||
end
|
||||
|
||||
def flag_or_remove_blocked_slots(slots, blocked_slots, user)
|
||||
if user.admin? || user.manager?
|
||||
if user && (user.admin? || user.manager?)
|
||||
blocked_slots.each do |slot|
|
||||
slot.is_blocked = true
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user