app/models/tramway/event/event.rb in tramway-event-1.12.3.5 vs app/models/tramway/event/event.rb in tramway-event-1.12.3.6
- old
+ new
@@ -5,10 +5,10 @@
validate :check_dimensions
def check_dimensions
if photo.present?
- errors.add :photo, :too_small_image if photo.width < 1920 || photo.height < 1080
+ errors.add :photo, :too_small_image if photo.width.present? && (photo.width < 1920 || photo.height < 1080)
end
end
has_many :participants, class_name: 'Tramway::Event::Participant'
has_many :participant_form_fields, class_name: 'Tramway::Event::ParticipantFormField'