fix: update region name and clear code
- Update region name with data from the input - Set code to nil to reset any previous values - Preserve other attributes like translations, flag, and wiki_data_id This change ensures that region data is updated correctly with the provided input while eliminating any previous code settings that may no longer be relevant.
This commit is contained in:
parent
e774b3e736
commit
97330fef91
@ -28,6 +28,8 @@ namespace :geo do
|
|||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
region.update(
|
region.update(
|
||||||
|
name: data["name"],
|
||||||
|
code: nil,
|
||||||
translations: data["translations"],
|
translations: data["translations"],
|
||||||
flag: data["flag"] || true,
|
flag: data["flag"] || true,
|
||||||
wiki_data_id: data["wikiDataId"]
|
wiki_data_id: data["wikiDataId"]
|
||||||
|
Loading…
Reference in New Issue
Block a user