mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-29 09:33:54 +01:00
Fixes a QuerySet.
This commit is contained in:
parent
9db5b45ec7
commit
272bfba95d
@ -168,10 +168,10 @@ class Index(object):
|
||||
obj._object_id = force_text(obj.pk)
|
||||
obj._body_ = self.prepare_body(obj)
|
||||
connection = connections[self.db_alias]
|
||||
# if connection.pg_version >= 90500: # PostgreSQL >= 9.5
|
||||
# self.add_items_upsert(connection, content_type_pk, objs, config)
|
||||
# else:
|
||||
self.add_items_update_then_create(content_type_pk, objs, config)
|
||||
if connection.pg_version >= 90500: # PostgreSQL >= 9.5
|
||||
self.add_items_upsert(connection, content_type_pk, objs, config)
|
||||
else:
|
||||
self.add_items_update_then_create(content_type_pk, objs, config)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
@ -331,7 +331,7 @@ class PostgresSearchBackend(BaseSearchBackend):
|
||||
self.get_index_for_object(obj_list[0]).add_items(model, obj_list)
|
||||
|
||||
def delete(self, obj):
|
||||
obj.index_entries.delete()
|
||||
obj.index_entries.all().delete()
|
||||
|
||||
|
||||
SearchBackend = PostgresSearchBackend
|
||||
|
Loading…
Reference in New Issue
Block a user