mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
[bug taiga#25] allow event update if removing nb places
This commit is contained in:
parent
11b43afc9a
commit
e1567ba7c5
@ -86,7 +86,7 @@ class Event < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def update_nb_free_places
|
||||
unless nb_total_places_was.nil?
|
||||
unless nb_total_places_was.nil? or nb_total_places.nil?
|
||||
diff = nb_total_places - nb_total_places_was
|
||||
self.nb_free_places += diff
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user