Skip to content
Snippets Groups Projects
Commit bd3bffb2 authored by Sébastien Alix's avatar Sébastien Alix Committed by Alexandre Fayolle
Browse files

[FIX] registry: check if index exists before logging


The `update_db_index` method is called even if the field has no index
(the check on `index` field attribute is here on purpose).

Before 13f02a60 was applied, the call of `sql.drop_index` was taking
care of the index existence if a `IF EXISTS` SQL statement, so even if
the field had no index it wasn't causing any issue.

With 13f02a60 applied, the log 'Keep unexpected index' is spam even if
the field has actually no index at all in the database.

This commit ensures to check the existence of the index before logging.

closes odoo/odoo#75748

X-original-commit: 57f078b6
Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
parent c2df3d43
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment