1
0
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:
Sylvain 2016-04-13 12:09:00 +02:00
parent ef72d07a9e
commit 11b43afc9a

View File

@ -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