Fixed the save method of the LocalizedModel data model to find the l10n records only for existing models, to work with Django 4.1.
This commit is contained in:
parent
4afd072cc5
commit
f57162a93c
@ -126,6 +126,9 @@ class LocalizedModel(models.Model):
|
||||
current_value = getattr(self, name + "_l10n")
|
||||
if current_value is None or current_value == "":
|
||||
setattr(self, name + "_l10n", new_value)
|
||||
if self.pk is None:
|
||||
l10n_rec = None
|
||||
else:
|
||||
l10n_rec = self._get_l10n_set()\
|
||||
.filter(name=name, language=language)\
|
||||
.first()
|
||||
|
Loading…
Reference in New Issue
Block a user