fix in file_list issue due to import data

This commit is contained in:
Anand Doshi 2012-06-20 13:46:40 +05:30
parent eadc5e6a91
commit 431dc688bb
2 changed files with 3 additions and 3 deletions

View file

@ -117,7 +117,7 @@ wn.widgets.form.sidebar.Attachment = function(parent, filedet, frm) {
// download
var display_name = this.fileid;
if(this.fileid.substr(0,8)=='FileData')
if(this.fileid && this.fileid.substr(0,8)=='FileData')
display_name = this.filename;
this.ln = $a(this.wrapper, 'a', 'link_type small', {}, display_name);
this.ln.href = 'files/'+this.fileid;

View file

@ -30,7 +30,7 @@ def get_template():
doctype_dl = webnotes.model.doctype.get(doctype)
tablecolumns = [f[0] for f in webnotes.conn.sql('desc `tab%s`' % doctype)]
def getinforow(docfield):
"""make info comment"""
if docfield.fieldtype == 'Select':
@ -68,7 +68,7 @@ def get_template():
def append_row(t, mandatory):
docfield = getdocfield(t)
if docfield and ((mandatory and docfield.reqd) or (not mandatory and not docfield.reqd)) \
and (t not in ('parenttype', 'trash_reason')):
and (t not in ('parenttype', 'trash_reason', 'file_list')):
fieldrow.append(t)
mandatoryrow.append(docfield.reqd and 'Yes' or 'No')
typerow.append(docfield.fieldtype)