jlm / maint

802.1 Maintenance database
Apache License 2.0
1 stars 0 forks source link

Minutes model should not save records without dates #66

Open PaulCongdon opened 4 years ago

PaulCongdon commented 4 years ago

Looks like the validator in the minutes model should be updated since we aren't 'importing' minutes anymore and it appears we have minutes in the database without dates. The validator below in models/minute.rb should be updated by dropping the unless (perhaps?):

class Minute < ActiveRecord::Base belongs_to :item belongs_to :meeting belongs_to :minst validates :date, presence: true, unless: "Rails.application.config.importing" end

jlm commented 3 years ago

I don't think this would affect anything, because importing is only set during an import. I'd prefer to keep the option of importing, because I still want other groups to start using the app. I'll check whether item creation via the REST interface includes a check against a nil date.