Skip to content

Commit 9a8d1e5

Browse files
Fix 'cannot access local variable 'func' where it is not associated with a value' issue
1 parent 700856d commit 9a8d1e5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/country_workspace/workspaces/admin/cleaners/mass_update.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,6 @@ def mass_update_impl(
116116
func = operations.get_function_by_id(op)
117117
record.flex_fields[field_name] = func(old_value, new_value)
118118
elif create_missing_fields:
119+
func = operations.get_function_by_id(op)
119120
record.flex_fields[field_name] = func("", new_value)
120121
record.save()

0 commit comments

Comments
 (0)