# HG changeset patch # User Florian Zeitz # Date 1371161277 -7200 # Node ID ef490e9276df71eb76cfb2e444e15ce04d5ea553 # Parent e7b9ba2d0638dc800a7e73d66899ee04f78e8ed9 util.dataforms: Return nil for empty list-mutli responses, to be consistent with other readers diff -r e7b9ba2d0638 -r ef490e9276df util/dataforms.lua --- a/util/dataforms.lua Thu Jun 13 13:56:35 2013 +0100 +++ b/util/dataforms.lua Fri Jun 14 00:07:57 2013 +0200 @@ -187,7 +187,11 @@ for value in field_tag:childtags("value") do result[#result+1] = value:get_text(); end - return result, (required and #result == 0 and "Required value missing" or nil); + if #result > 0 then + return result; + elseif required then + return nil, "Required value missing"; + end end field_readers["text-multi"] =