Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def import_entry_tags(self, tags, page):
self.stdout.write("\tImporting tags...")
for tag in tags:
domain = tag.attrib.get('domain', 'category')
if 'tag' in domain and tag.attrib.get('nicename'):
self.stdout.write(u'\t\t{}'.format(tag.text))
puput_tag, created = PuputTag.objects.update_or_create(name=tag.text)
page.entry_tags.add(PuputTagEntryPage(tag=puput_tag))