fix imports
This commit is contained in:
@@ -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={
|
||||
|
||||
Reference in New Issue
Block a user