Skip to content

Commit

Permalink
fix: some types
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Nov 21, 2024
1 parent 523958e commit f6dd4e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions algoliasearch_django/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ def __init__(self, settings=SETTINGS):

self.__registered_models = {}
self.client = SearchClientSync(app_id, api_key)
self.client._config.user_agent.add("Algolia for Django", VERSION).add(
"Django", django_version()
)
self.client.add_user_agent("Algolia for Django", VERSION)
self.client.add_user_agent("Django", django_version())

def is_registered(self, model):
"""Checks whether the given models is registered with Algolia engine"""
Expand Down
12 changes: 6 additions & 6 deletions tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ class User(models.Model):
name = models.CharField(max_length=30)
username = models.CharField(max_length=30, unique=True)
bio = models.CharField(max_length=140, blank=True)
followers_count = models.BigIntegerField(default=0)
following_count = models.BigIntegerField(default=0)
_lat = models.FloatField(default=0)
_lng = models.FloatField(default=0)
followers_count = models.BigIntegerField(0)
following_count = models.BigIntegerField(0)
_lat = models.FloatField(0)
_lng = models.FloatField(0)
_permissions = models.CharField(max_length=30, blank=True)

@property
Expand All @@ -25,7 +25,7 @@ def permissions(self):
class Website(models.Model):
name = models.CharField(max_length=100)
url = models.URLField()
is_online = models.BooleanField(default=False)
is_online = models.BooleanField(False)


class Example(models.Model):
Expand All @@ -34,7 +34,7 @@ class Example(models.Model):
address = models.CharField(max_length=200)
lat = models.FloatField()
lng = models.FloatField()
is_admin = models.BooleanField(default=False)
is_admin = models.BooleanField(False)
category = []
locations = []
index_me = True
Expand Down

0 comments on commit f6dd4e7

Please sign in to comment.