This commit is contained in:
Kovid Goyal 2010-09-11 04:25:57 -06:00
commit 0364d0d4e2

View File

@ -156,8 +156,12 @@ class Metadata(object):
the key name not the label the key name not the label
''' '''
if field is not None: if field is not None:
if not field.startswith('#'):
raise AttributeError(
'Custom field name %s must begin with \'#\''%repr(field))
if metadata is None: if metadata is None:
traceback.print_stack() traceback.print_stack()
return
metadata = copy.deepcopy(metadata) metadata = copy.deepcopy(metadata)
if '#value#' not in metadata: if '#value#' not in metadata:
if metadata['datatype'] == 'text' and metadata['is_multiple']: if metadata['datatype'] == 'text' and metadata['is_multiple']: