diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-01-17 11:05:46 +0200 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-01-17 11:07:48 +0200 |
commit | 727d448b5c0024e3f35e082e66fb07b33b591b23 (patch) | |
tree | ed2e983344c1624777aba832b29c709bb93a1189 /acf2/model | |
parent | 926bdd64090eba7f0318c036d5737524780622e6 (diff) | |
download | aconf-727d448b5c0024e3f35e082e66fb07b33b591b23.tar.bz2 aconf-727d448b5c0024e3f35e082e66fb07b33b591b23.tar.xz |
model: make choices work for non-string fields
Diffstat (limited to 'acf2/model')
-rw-r--r-- | acf2/model/field.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/acf2/model/field.lua b/acf2/model/field.lua index 8728dbb..c5e36f2 100644 --- a/acf2/model/field.lua +++ b/acf2/model/field.lua @@ -1,5 +1,5 @@ --[[ -Copyright (c) 2012-2013 Kaarle Ritvanen +Copyright (c) 2012-2014 Kaarle Ritvanen See LICENSE file for license details --]] @@ -29,6 +29,7 @@ end function M.Member:auto_ui_name(name) if not name then return end + if type(name) ~= 'string' then return tostring(name) end local res = (name:sub(1, 1):upper()..name:sub(2)):gsub('-', ' ') return res end |