API: Fix old meta values being returned when updating event (fixes #5077) (#5080)

This commit is contained in:
Raphael Michel
2025-05-09 08:59:40 +02:00
committed by GitHub
parent 7472564c26
commit 5522d67f9b
2 changed files with 7 additions and 0 deletions

View File

@@ -378,6 +378,8 @@ class EventSerializer(SalesChannelMigrationMixin, I18nAwareModelSerializer):
if prop.name not in meta_data:
current_object.delete()
instance._prefetched_objects_cache.clear()
# Item Meta properties
if item_meta_properties is not None:
current = list(event.item_meta_properties.all())
@@ -398,6 +400,8 @@ class EventSerializer(SalesChannelMigrationMixin, I18nAwareModelSerializer):
if prop.name not in list(item_meta_properties.keys()):
prop.delete()
instance._prefetched_objects_cache.clear()
# Seats
if seat_category_mapping is not None or ('seating_plan' in validated_data and validated_data['seating_plan'] is None):
current_mappings = {