Autopopulate source name tag on imports

This commit is contained in:
Tim Van Baak 2019-12-17 09:53:59 -08:00
parent 55214a117a
commit f1ccef1599
1 changed files with 3 additions and 1 deletions

View File

@ -112,7 +112,9 @@ def populate_new(item):
if 'time' not in item: item['time'] = None
if 'author' not in item: item['author'] = None
if 'body' not in item: item['body'] = None
if 'tags' not in item: item['tags'] = [item['source']]
tags = item['tags'] if 'tags' in item else []
if item['source'] not in tags: tags.insert(0, item['source'])
item['tags'] = tags
if 'ttl' not in item: item['ttl'] = 0
def populate_old(prior, new):