Fix event registatrion for rooms without size

If the room size is not set (which is possible as the size is not
mandatory), the events registrations page breaks because of a
comparison of nil with Integer.
This commit is contained in:
Ana María Martínez Gómez 2019-05-30 13:21:21 +02:00
parent 617f1e9eb0
commit 51c8af42ab
No known key found for this signature in database
GPG key ID: EACB9B4BC80C0347

View file

@ -11,7 +11,7 @@
for
= @event.title
- if @event.room && (@event_registrations.length > @event.room.size)
- if @event.room.try(:size) && (@event_registrations.length > @event.room.size)
%b Attention:
You have more registrations than the capacity of the room!