diff --git a/lib/dato_cms_graphql/rails/persistence.rb b/lib/dato_cms_graphql/rails/persistence.rb index ea7ce6c..228071f 100644 --- a/lib/dato_cms_graphql/rails/persistence.rb +++ b/lib/dato_cms_graphql/rails/persistence.rb @@ -7,7 +7,7 @@ def self.persist_record(query, record) ) .update( render: query.render?, - permalink: record.permalink, + permalink: (record.permalink if record.respond_to?(:permalink)), cms_record: record.localized_raw_attributes ) end