From c297d65316e9f0d7118beea82b2f733b10a3c174 Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Thu, 9 Feb 2012 15:45:39 +0100 Subject: [PATCH] Tweak a docstring --- ckan/model/package.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ckan/model/package.py b/ckan/model/package.py index a87abdcb968..871a08353a2 100644 --- a/ckan/model/package.py +++ b/ckan/model/package.py @@ -178,14 +178,15 @@ def add_tags(self, tags): def add_tag_by_name(self, tag_name, vocab=None, autoflush=True): """Add a tag with the given name to this package's tags. - By default only free tags (tags which do not belong to any vocabulary) - are used. If the optional argument vocab is given then only tags - belonging to that vocabulary will be used. - - If no tag with the given name exists, one will be created. If the - optional argument vocab is given and no tag with the given name exists - in the given vocabulary, then a new tag will be created and added to - the vocabulary. + By default the given tag_name will be searched for among the free tags + (tags which do not belong to any vocabulary) only. If the optional + argument `vocab` is given then the named vocab will be searched for the + tag name instead. + + If no tag with the given name is found, one will be created. If the + optional argument vocab is given and there is no tag with the given + name in the given vocabulary, then a new tag will be created and added + to the vocabulary. """ from tag import Tag