mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-05 13:21:18 +00:00
Handle subscribe renew date, langchain, pydantic & logger.warn warnings
- Ensure langchain less than 0.2.0 is used, to prevent breaking ChatOpenAI, PyMuPDF usage due to their deprecation after 0.2.0 - Set subscription renewal date to a timezone aware datetime - Use logger.warning instead of logger.warn as latter is deprecated - Use `model_dump' not deprecated dict to get all configured content_types
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import os
|
||||
from datetime import datetime
|
||||
|
||||
import factory
|
||||
from django.utils.timezone import make_aware
|
||||
|
||||
from khoj.database.models import (
|
||||
ChatModelOptions,
|
||||
@@ -90,4 +92,4 @@ class SubscriptionFactory(factory.django.DjangoModelFactory):
|
||||
user = factory.SubFactory(UserFactory)
|
||||
type = "standard"
|
||||
is_recurring = False
|
||||
renewal_date = "2100-04-01"
|
||||
renewal_date = make_aware(datetime.strptime("2100-04-01", "%Y-%m-%d"))
|
||||
|
||||
Reference in New Issue
Block a user