Skip to content

Commit b3f694a

Browse files
committed
handle 0 or ''
1 parent 468fb52 commit b3f694a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sentry/migrations/0533_remove_name_data_from_rule.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ def remove_name_data(apps, schema_editor):
1111

1212
for rule in RangeQuerySetWrapperWithProgressBar(Rule.objects.all()):
1313
for action in rule.data.get("actions", []):
14-
if action.get("name"):
14+
if action.get("name") or action.get("name") in [0, ""]:
1515
del action["name"]
1616

1717
for condition in rule.data.get("conditions", []):
18-
if condition.get("name"):
18+
if condition.get("name") or condition.get("name") in [0, ""]:
1919
del condition["name"]
2020

2121
rule.save(update_fields=["data"])

0 commit comments

Comments
 (0)