Cleanup
This commit is contained in:
parent
e07da529f1
commit
d2f896966a
@ -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()
|
||||
|
@ -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]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user