fix imports

This commit is contained in:
2019-01-28 00:32:34 +03:00
parent fbfe72c774
commit cba3643e02
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -7,8 +7,6 @@ from django.conf import settings
from django.db import models
from pyrogram import Chat as PyrogramChat, Message as PyrogramMessage
from aggregator.tasks import collect_new_messages
class AggregationSource(models.Model):
owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
@@ -28,6 +26,8 @@ class Chat(models.Model):
@classmethod
def from_obj(cls, chat: PyrogramChat, client):
from aggregator.tasks import collect_new_messages
obj, created = Chat.objects.update_or_create(
chat_id=chat.id,
defaults={