crop creator is optional

doesn't get set when crop has just been requested
This commit is contained in:
Brenda Wallace committed 2018-01-07 18:44:03 +13:00
1 parent 9e5aba75d8
commit 73ffbb0272
1 file changed
+1 -1
+1 -1
View File
@@ -16,7 +16,7 @@ class Crop < ApplicationRecord
has_many :seeds
has_many :harvests
has_many :plant_parts, -> { distinct.reorder("plant_parts.name") }, through: :harvests
belongs_to :creator, class_name: 'Member'
belongs_to :creator, class_name: 'Member', optional: true
belongs_to :requester, class_name: 'Member', optional: true
belongs_to :parent, class_name: 'Crop', optional: true
has_many :varieties, class_name: 'Crop', foreign_key: 'parent_id'