📅  最后修改于: 2022-03-11 14:46:40.393000             🧑  作者: Mango
new_tags = []
for t in tags:
existing_tag = self.through.tag_model().objects.get(name__iexact=t)
if existing_tag:
new_tags.append(existing_tag)
else:
new_tags.append(t)
tags = set(new_tags)