1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-11-02 08:34:32 +01:00
This commit is contained in:
Ehouarn
2025-10-31 17:48:24 +01:00
parent 30a598c0b7
commit 624f94823c
4 changed files with 251 additions and 5 deletions

View File

@@ -256,7 +256,7 @@ class TransformedFood(Food):
self.allergens.set(self.allergens.union(child.allergens.all()))
if not (child.polymorphic_ctype.model == 'basicfood' and child.date_type == 'DDM'):
self.expiry_date = min(self.expiry_date, child.expiry_date)
return super().save(force_insert, force_update, using, update_fields)
return super().save(force_insert=False, force_update=force_update, using=using, update_fields=update_fields)
class Meta:
verbose_name = _('Transformed food')