Skip to content

Commit b2cd1dc

Browse files
committed
Skip custom value handeling without custom fields
1 parent a53cfe2 commit b2cd1dc

File tree

1 file changed

+2
-0
lines changed
  • django_features/custom_fields/models

1 file changed

+2
-0
lines changed

django_features/custom_fields/models/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ class Meta:
138138

139139
def save(self, **kwargs: Any) -> None:
140140
super().save(**kwargs)
141+
if not self.custom_values.exists():
142+
return
141143
if self._custom_values_to_remove:
142144
self.custom_values.remove(*self._custom_values_to_remove)
143145

0 commit comments

Comments
 (0)