diff --git a/base_location/migrations/12.0.1.0.0/post-migration.py b/base_location/migrations/12.0.1.0.0/post-migration.py index db2a67baa..1f9041b56 100644 --- a/base_location/migrations/12.0.1.0.0/post-migration.py +++ b/base_location/migrations/12.0.1.0.0/post-migration.py @@ -36,7 +36,7 @@ def migrate(env, version): SET city_id = rc.id FROM res_city rc WHERE rc.name = rbz.city - AND rc.state_id = rbz.state_id + AND rc.state_id IS NOT DISTINCT FROM rbz.state_id AND rc.country_id = rbz.country_id AND rbz.city_id IS NULL""", )