Skip to content

Commit

Permalink
Update only syllables-field
Browse files Browse the repository at this point in the history
  • Loading branch information
mhieta committed Jun 4, 2024
1 parent 42c4657 commit 5adc9a0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions services/management/commands/index_search_columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ def generate_syllables(
"""
# Disable sending of signals
model._meta.auto_created = True
save_kwargs = {}
num_populated = 0
if model.__name__ == "Address" and not hyphenate_all_addresses:
save_kwargs["skip_modified_at"] = True
if not hyphenate_addresses_from:
hyphenate_addresses_from = Address.objects.latest(
"modified_at"
Expand All @@ -63,7 +61,7 @@ def generate_syllables(
if len(syllables) > 1:
for s in syllables:
row.syllables_fi.append(s)
row.save(**save_kwargs)
row.save(update_fields=["syllables_fi"])
num_populated += 1
# Enable sending of signals
model._meta.auto_created = False
Expand Down

0 comments on commit 5adc9a0

Please sign in to comment.