mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 13:01:08 +00:00
fixing errors from checks
This commit is contained in:
parent
0c429ee6d7
commit
4fb3cbfc29
3 changed files with 4 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
|||
""" using django model forms """
|
||||
from dataclasses import field
|
||||
import datetime
|
||||
from collections import defaultdict
|
||||
from urllib.parse import urlparse
|
||||
|
|
|
@ -52,9 +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=False if invite_request_question is False else True,
|
||||
# blank=False if invite_request_question is False else True
|
||||
)
|
||||
# images
|
||||
logo = models.ImageField(upload_to="logos/", null=True, blank=True)
|
||||
|
@ -108,8 +109,7 @@ class SiteSettings(models.Model):
|
|||
"""if require_confirm_email is disabled, make sure no users are pending"""
|
||||
if not self.require_confirm_email:
|
||||
User.objects.filter(is_active=False, deactivation_reason="pending").update(
|
||||
is_active=True, deactivation_reason=None
|
||||
)
|
||||
is_active=True, deactivation_reason=None)
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
""" database schema for user data """
|
||||
import re
|
||||
import string
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from django.apps import apps
|
||||
|
|
Loading…
Reference in a new issue