gdritter repos frony-ritter-designs / a56e485
create tags differently Getty Ritter 3 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Collapse all Expand all
8585 old_tags = set((t.tag_name for t in self.tags))
8686 new_tags = set(stuff['tags'])
8787 for to_add in new_tags - old_tags:
88 Tag(tag_name=to_add, design=self).create()
88 Tag.create(tag_name=to_add, design=self)
8989 for to_remove in old_tags - new_tags:
9090 Tag.get(tag_name=to_remove, design=self).delete_instance()
9191 self.save()