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 no places nb was set
This commit is contained in:
parent
ef72d07a9e
commit
11b43afc9a
@ -86,7 +86,9 @@ class Event < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def update_nb_free_places
|
||||
diff = nb_total_places - nb_total_places_was
|
||||
self.nb_free_places += diff
|
||||
unless nb_total_places_was.nil?
|
||||
diff = nb_total_places - nb_total_places_was
|
||||
self.nb_free_places += diff
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user