util.dataforms: Only include options in 'form' type forms
authorKim Alvefur <zash@zash.se>
Fri, 03 Aug 2018 21:05:48 +0200
changeset 9091 aa1b02411846
parent 9090 9e45e7adcebf
child 9092 3a7a0b9f42f3
util.dataforms: Only include options in 'form' type forms Options should not be needed in other types of forms.
util/dataforms.lua
--- a/util/dataforms.lua	Fri Aug 03 20:59:15 2018 +0200
+++ b/util/dataforms.lua	Fri Aug 03 21:05:48 2018 +0200
@@ -50,7 +50,7 @@
 			value = field.value;
 		end
 
-		if formtype ~= "result" and field.options then
+		if formtype == "form" and field.options then
 			local defaults = {};
 			for _, val in ipairs(field.options) do
 				if type(val) == "table" then