Skip to content

Commit

Permalink
Export a content's references as list of UID values.
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Jan 4, 2015
1 parent 48a112d commit 7e9dc7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
0.3 (unreleased)
----------------

- Export a content's references as list of UID values.
[thet]

- Declare the ``content_type`` of a field's value only for ``TextField`` and
``StringField``.
[thet]
Expand Down
6 changes: 5 additions & 1 deletion collective/jsonify/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,11 @@ def get_archetypes_fields(self):
}

elif type_ in ['ReferenceField']:
pass
# If there are references, add the UIDs to the referenced
# contents
value = field.getRaw(self.context)
if value:
self[fieldname] = value

elif type_ in ['ComputedField']:
continue
Expand Down

0 comments on commit 7e9dc7a

Please sign in to comment.