From 0240ffca34b88e4b7b4d616290b5c5f450a69e6a Mon Sep 17 00:00:00 2001 From: "Stanko K.R." Date: Fri, 30 Jan 2026 15:54:05 +0100 Subject: [PATCH] Fix import validation failure During import, card return nil since it doesn't exist yet --- app/models/assignment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/assignment.rb b/app/models/assignment.rb index 75ffde959..28728124f 100644 --- a/app/models/assignment.rb +++ b/app/models/assignment.rb @@ -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