From ca42df1ef6e34c15fcca781b22226b1027326a01 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 12 Jul 2015 00:37:31 +0200 Subject: [PATCH] Improved error handling. --- app/models/application_model.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/application_model.rb b/app/models/application_model.rb index dada2bb6b..f5e4fd9c6 100644 --- a/app/models/application_model.rb +++ b/app/models/application_model.rb @@ -1059,6 +1059,7 @@ check string/varchar size and cut them if needed next if self[ attribute[0] ].class != String next if self[ attribute[0] ].empty? column = self.class.columns_hash[ attribute[0] ] + next if !column limit = column.limit if column && limit current_length = attribute[1].to_s.length