API: Minor robustness improvements in quota and checkinlist serializers

This commit is contained in:
Raphael Michel
2022-02-17 17:36:33 +01:00
parent 06ffa0bcd5
commit 98409b0a22
2 changed files with 2 additions and 2 deletions

View File

@@ -60,7 +60,7 @@ class CheckinListSerializer(I18nAwareModelSerializer):
full_data = self.to_internal_value(self.to_representation(self.instance)) if self.instance else {}
full_data.update(data)
for item in full_data.get('limit_products'):
for item in full_data.get('limit_products', []):
if event != item.event:
raise ValidationError(_('One or more items do not belong to this event.'))