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_categories(self, category_nodes, page):
for category_node in category_nodes:
domain = category_node.attrib.get('domain')
if domain == 'category':
puput_category = PuputCategory.objects.get(name=category_node.text)
PuputCategoryEntryPage.objects.get_or_create(category=puput_category, page=page)