if recipe.tags == None:
recipe.tags = []
tag = self._clean_tag(tag)
- if tag == None:
- return
- if tag not in recipe.tags:
+ if tag != None and tag not in recipe.tags:
recipe.tags.append(tag)
with open(recipe.path, 'w') as f:
recipe.save(f)
if recipe.tags == None:
return
tag = self._clean_tag(tag)
- if tag == None:
- return
- if tag in recipe.tags:
+ if tag != None and tag in recipe.tags:
recipe.tags.remove(tag)
with open(recipe.path, 'w') as f:
recipe.save(f)