forked from mirrors/bookwyrm
removes unneeded imports
This commit is contained in:
parent
9b7f0366e7
commit
1e01e76ac2
5 changed files with 5 additions and 4 deletions
|
@ -16,7 +16,8 @@ class Author(ActivitypubMixin, BookWyrmModel):
|
|||
max_length=255, blank=True, null=True, deduplication_field=True)
|
||||
sync = models.BooleanField(default=True)
|
||||
last_sync_date = models.DateTimeField(default=timezone.now)
|
||||
wikipedia_link = fields.CharField(max_length=255, blank=True, null=True, deduplication_field=True)
|
||||
wikipedia_link = fields.CharField(
|
||||
max_length=255, blank=True, null=True, deduplication_field=True)
|
||||
# idk probably other keys would be useful here?
|
||||
born = fields.DateTimeField(blank=True, null=True)
|
||||
died = fields.DateTimeField(blank=True, null=True)
|
||||
|
|
|
@ -44,6 +44,7 @@ class BookWyrmModel(models.Model):
|
|||
|
||||
|
||||
@receiver(models.signals.post_save)
|
||||
#pylint: disable=unused-argument
|
||||
def execute_after_save(sender, instance, created, *args, **kwargs):
|
||||
''' set the remote_id after save (when the id is available) '''
|
||||
if not created or not hasattr(instance, 'get_remote_id'):
|
||||
|
|
|
@ -6,7 +6,6 @@ from django.db import models
|
|||
from django.utils import timezone
|
||||
|
||||
from bookwyrm import books_manager
|
||||
from bookwyrm.connectors import ConnectorException
|
||||
from bookwyrm.models import ReadThrough, User, Book
|
||||
from bookwyrm.utils.fields import JSONField
|
||||
from .base_model import PrivacyLevels
|
||||
|
|
|
@ -37,7 +37,7 @@ class UserRelationship(ActivitypubMixin, BookWyrmModel):
|
|||
|
||||
activity_serializer = activitypub.Follow
|
||||
|
||||
def get_remote_id(self, status=None):
|
||||
def get_remote_id(self, status=None):# pylint: disable=arguments-differ
|
||||
''' use shelf identifier in remote_id '''
|
||||
status = status or 'follows'
|
||||
base_path = self.user_subject.remote_id
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
''' Handle user activity '''
|
||||
from django.utils import timezone
|
||||
|
||||
from bookwyrm import activitypub, books_manager, models
|
||||
from bookwyrm import models
|
||||
from bookwyrm.sanitize_html import InputHtmlParser
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue