Skip to content

Commit

Permalink
Fix: Correctly exclude fields that are used in the slug by default
Browse files Browse the repository at this point in the history
  • Loading branch information
bobdenotter committed Aug 24, 2020
1 parent 0932a98 commit cd9f40f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/helpers/_fields.twig
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

{# Skip over the fields that are used in the slug, unless explicitly told not to,
using the `skip_uses` parameter. #}
{% if (record.contentType.fields.slug.uses|default(null) is iterable) and skip_uses|default(true) %}
{% set omittedkeys = omittedkeys|merge(record.contentType.fields.slug.uses) %}
{% if (record.definition.fields.slug.uses|default(null) is iterable) and skip_uses|default(true) %}
{% set omittedkeys = omittedkeys|merge(record.definition.fields.slug.uses) %}
{% endif %}

{# We also skip over the fields that are explicitly excluded. #}
Expand Down

0 comments on commit cd9f40f

Please sign in to comment.