arslan-ahmed commited on
Commit
f14681d
1 Parent(s): 83db539

Update ttyd_functions.py

Browse files
Files changed (1) hide show
  1. ttyd_functions.py +1 -1
ttyd_functions.py CHANGED
@@ -286,7 +286,7 @@ def getSourcesFromMetadata(metadata, sourceOnly=True, sepFileUrl=True):
286
  source = source.rsplit('/',1)[-1] if 'http' not in source else source
287
  notSource = []
288
  for k,v in x.items():
289
- if v is not None and k!='source' and k in ['page', 'title']:
290
  notSource.extend([f"{k}: {v}"])
291
  metadataText = ', '.join([f'source: {source}'] + notSource) if sourceOnly==False else source
292
  setSrc.add(metadataText)
 
286
  source = source.rsplit('/',1)[-1] if 'http' not in source else source
287
  notSource = []
288
  for k,v in x.items():
289
+ if v is not None and k!='source' and k in ['page']:
290
  notSource.extend([f"{k}: {v}"])
291
  metadataText = ', '.join([f'source: {source}'] + notSource) if sourceOnly==False else source
292
  setSrc.add(metadataText)