forked from mirrors/bookwyrm
bw-dev blacked
This commit is contained in:
parent
bb7d080f65
commit
0c429ee6d7
2 changed files with 6 additions and 10 deletions
|
@ -52,10 +52,10 @@ class SiteSettings(models.Model):
|
|||
require_confirm_email = models.BooleanField(default=True)
|
||||
|
||||
invite_question_text = models.CharField(
|
||||
max_length=255,
|
||||
null=not(invite_request_question),
|
||||
default="What is your favourite book?"
|
||||
)
|
||||
max_length=255,
|
||||
null=not (invite_request_question),
|
||||
default="What is your favourite book?",
|
||||
)
|
||||
# images
|
||||
logo = models.ImageField(upload_to="logos/", null=True, blank=True)
|
||||
logo_small = models.ImageField(upload_to="logos/", null=True, blank=True)
|
||||
|
|
|
@ -96,7 +96,7 @@ class ManageInviteRequests(View):
|
|||
"created_date",
|
||||
"invite__times_used",
|
||||
"invite__invitees__created_date",
|
||||
"answer"
|
||||
"answer",
|
||||
]
|
||||
# pylint: disable=consider-using-f-string
|
||||
if not sort in sort_fields + ["-{:s}".format(f) for f in sort_fields]:
|
||||
|
@ -145,7 +145,6 @@ class ManageInviteRequests(View):
|
|||
models.InviteRequest, id=request.POST.get("invite-request")
|
||||
)
|
||||
|
||||
|
||||
# only create a new invite if one doesn't exist already (resending)
|
||||
if not invite_request.invite:
|
||||
invite_request.invite = models.SiteInvite.objects.create(
|
||||
|
@ -173,10 +172,7 @@ class InviteRequest(View):
|
|||
received = True
|
||||
form.save()
|
||||
|
||||
data = {
|
||||
"request_form": form,
|
||||
"request_received": received
|
||||
}
|
||||
data = {"request_form": form, "request_received": received}
|
||||
return TemplateResponse(request, "landing/landing.html", data)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue