Prevent storing empty results
Fixes CODEOCEAN-HS
This commit is contained in:

committed by
Sebastian Serth

parent
46bd9142c7
commit
e632f95060
@ -42,7 +42,7 @@ class LinterCheckRun < ApplicationRecord
|
||||
end
|
||||
|
||||
# Now, we store all check runs and skip validations (they are already done)
|
||||
LinterCheckRun.insert_all!(validated_check_runs) # rubocop:disable Rails/SkipsModelValidations
|
||||
LinterCheckRun.insert_all!(validated_check_runs) if validated_check_runs.present? # rubocop:disable Rails/SkipsModelValidations
|
||||
end
|
||||
private_class_method :validate_and_store!
|
||||
end
|
||||
|
@ -94,7 +94,7 @@ class TestrunMessage < ApplicationRecord
|
||||
end
|
||||
|
||||
# Now, we store all messages and skip validations (they are already done)
|
||||
TestrunMessage.insert_all!(validated_messages) # rubocop:disable Rails/SkipsModelValidations
|
||||
TestrunMessage.insert_all!(validated_messages) if validated_messages.present? # rubocop:disable Rails/SkipsModelValidations
|
||||
end
|
||||
private_class_method :validate_and_store!
|
||||
|
||||
|
Reference in New Issue
Block a user