Skip to content
Snippets Groups Projects
Commit 57f078b6 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#75387

Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
parent 69be08db
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment