diff --git a/bookmarks/models.py b/bookmarks/models.py index 964f307..4efa7af 100644 --- a/bookmarks/models.py +++ b/bookmarks/models.py @@ -57,7 +57,7 @@ class Bookmark(models.Model): @property def tag_names(self): # If tag projections were loaded then avoid querying all tags (=executing further selects) - if self.tag_string or self.tag_projection: + if self.tag_projection: return parse_tag_string(self.tag_string) else: return [tag.name for tag in self.tags.all()] @@ -66,9 +66,6 @@ class Bookmark(models.Model): return self.resolved_title + ' (' + self.url[:30] + '...)' -auto_fill_placeholder = 'Leave empty to fill from website metadata' - - class BookmarkForm(forms.ModelForm): # Use URLField for URL url = forms.URLField() diff --git a/bookmarks/services/tags.py b/bookmarks/services/tags.py index cc614cf..1c339e8 100644 --- a/bookmarks/services/tags.py +++ b/bookmarks/services/tags.py @@ -5,6 +5,7 @@ from django.utils import timezone from bookmarks.models import Tag + def get_or_create_tags(tag_names: List[str], user: User): return [get_or_create_tag(tag_name, user) for tag_name in tag_names]