diff --git a/app/models/esr_record.rb b/app/models/esr_record.rb
index <HASH>..<HASH> 100644
--- a/app/models/esr_record.rb
+++ b/app/models/esr_record.rb
@@ -95,6 +95,8 @@ class EsrRecord < ActiveRecord::Base
   end
   
   def assign_invoice
+    # Prepare remarks to not be null
+    self.remarks ||= ''
     if Invoice.exists?(invoice_id)
       self.invoice_id = invoice_id
       self.remarks += "Referenz #{reference}"
Prepare esr record remarks to not be null.