mirror of
https://github.com/hellosteadman/bambu-buffer.git
synced 2025-05-05 00:39:52 +00:00
Don't import models too soon
This commit is contained in:
parent
49068bd423
commit
7eb680d43c
1 changed files with 2 additions and 1 deletions
|
@ -2,7 +2,6 @@ from django.contrib.contenttypes.models import ContentType
|
|||
from django.contrib.sites.shortcuts import get_current_site
|
||||
from django.db.models import Model
|
||||
from bambu_buffer.exceptions import *
|
||||
from bambu_buffer.models import BufferToken, BufferProfile, BufferedItem
|
||||
from bambu_buffer.settings import POST_URL, TIMEOUT, AUTOPOST_MODELS
|
||||
from datetime import datetime, date
|
||||
from threading import Thread
|
||||
|
@ -30,6 +29,8 @@ class BufferThread(Thread):
|
|||
log.error(response.json())
|
||||
|
||||
def post(item, author, **kwargs):
|
||||
from bambu_buffer.models import BufferToken, BufferProfile, BufferedItem
|
||||
|
||||
try:
|
||||
token = author.buffer_token
|
||||
except BufferToken.DoesNotExist:
|
||||
|
|
Loading…
Reference in a new issue