Fix import validation failure

During import, card return nil since it doesn't exist yet
This commit is contained in:
Stanko K.R.
2026-01-30 15:54:05 +01:00
parent b659e326e1
commit 0240ffca34
+1 -1
View File
@@ -7,7 +7,7 @@ class Assignment < ApplicationRecord
belongs_to :assignee, class_name: "User"
belongs_to :assigner, class_name: "User"
validate :within_limit, on: :create
validate :within_limit, on: :create, if: -> { card.present? }
private
def within_limit