+ thing_tags.add(tag)
+ area_data['things'][tag.slug] = {
+ 'object': part['object'],
+ 'coords': part['coords'],
+ }
+ else:
+ for motif in part['themes']:
+ tag, created = catalogue.models.Tag.objects.get_or_create(slug=slughifi(motif), category='theme')
+ if created:
+ tag.name = motif
+ tag.sort_key = sortify(tag.name)
+ tag.save()
+ motif_tags.add(tag)
+ area_data['themes'][tag.slug] = {
+ 'theme': motif,
+ 'coords': part['coords']
+ }