kopia lustrzana https://github.com/wagtail/wagtail
Fixes a QuerySet.
rodzic
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
|
||||
|
|
Ładowanie…
Reference in New Issue