mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-17 21:56:36 +00:00
Apply suggestions from python lint
This commit is contained in:
parent
0801c66878
commit
8a84bd3490
2 changed files with 2 additions and 3 deletions
|
@ -112,7 +112,7 @@ class List(OrderedCollectionMixin, BookWyrmModel):
|
||||||
"""on save, update embed_key and avoid clash with existing code"""
|
"""on save, update embed_key and avoid clash with existing code"""
|
||||||
if not self.embed_key:
|
if not self.embed_key:
|
||||||
self.embed_key = uuid.uuid4()
|
self.embed_key = uuid.uuid4()
|
||||||
return super(List, self).save(*args, **kwargs)
|
return super().save(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class ListItem(CollectionItemMixin, BookWyrmModel):
|
class ListItem(CollectionItemMixin, BookWyrmModel):
|
||||||
|
|
|
@ -174,7 +174,7 @@ class List(View):
|
||||||
embed_url = request.build_absolute_uri(embed_url)
|
embed_url = request.build_absolute_uri(embed_url)
|
||||||
|
|
||||||
if request.GET:
|
if request.GET:
|
||||||
embed_url = "%s?%s" % (embed_url, request.GET.urlencode())
|
embed_url = f"{embed_url}?{request.GET.urlencode()}"
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"list": book_list,
|
"list": book_list,
|
||||||
|
@ -223,7 +223,6 @@ class EmbedList(View):
|
||||||
raise Http404()
|
raise Http404()
|
||||||
|
|
||||||
query = request.GET.get("q")
|
query = request.GET.get("q")
|
||||||
suggestions = None
|
|
||||||
|
|
||||||
# sort_by shall be "order" unless a valid alternative is given
|
# sort_by shall be "order" unless a valid alternative is given
|
||||||
sort_by = request.GET.get("sort_by", "order")
|
sort_by = request.GET.get("sort_by", "order")
|
||||||
|
|
Loading…
Reference in a new issue