create tags differently
Getty Ritter
3 years ago
85 | 85 | old_tags = set((t.tag_name for t in self.tags)) |
86 | 86 | new_tags = set(stuff['tags']) |
87 | 87 | for to_add in new_tags - old_tags: |
88 |
Tag |
|
88 | Tag.create(tag_name=to_add, design=self) | |
89 | 89 | for to_remove in old_tags - new_tags: |
90 | 90 | Tag.get(tag_name=to_remove, design=self).delete_instance() |
91 | 91 | self.save() |