From 985852fb097ab405554b55af34544f8d6b3f98ac Mon Sep 17 00:00:00 2001 From: Didier Lafforgue Date: Tue, 21 Sep 2021 00:31:00 +0200 Subject: [PATCH] persisting a content entry should skip the association fields --- lib/locomotive/steam/services/content_entry_service.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/locomotive/steam/services/content_entry_service.rb b/lib/locomotive/steam/services/content_entry_service.rb index 783b2a90..0e194232 100644 --- a/lib/locomotive/steam/services/content_entry_service.rb +++ b/lib/locomotive/steam/services/content_entry_service.rb @@ -87,6 +87,11 @@ def update_decorated_entry(decorated_entry, attributes) entry.attributes.delete(field.name) end + # remove any association field + _repository.content_type.association_fields.each do |field| + entry.attributes.delete(field.name) + end + _repository.update(entry) logEntryOperation(decorated_entry.content_type.slug, decorated_entry)