Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

Commit

Permalink
do not check id as required field
Browse files Browse the repository at this point in the history
Products.remember behaves oddly and has a schema entry for id
  • Loading branch information
dibell authored and John Carr committed Oct 18, 2012
1 parent 23a5f10 commit f2f4681
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
35 changes: 35 additions & 0 deletions CHANGES
@@ -0,0 +1,35 @@
Changelog
=========

0.0.11 (unreleased)
-------------------

- Do not check id as required field (fixes compatibility with
Products.remember)


0.0.10 (2011-09-05)
-------------------

- zkaffold.xml importer now depends on "content" instead of "plone-final".
Depending on "plone-final" means that portlets.xml gets imported before
zkaffold builds the site, but portlets.xml uses content in the site. So
we're chaning it to depend on "content" instead, which is plone's
"Import the site's structure and content" step.


0.0.9 (2011-08-23)
------------------

- Add <groups> support in members.xml

- Remove unused import that was causing unpleasant side effects - bad python!

- Documentation updates


0.0.8 (2011-02-14)
------------------

- Automatically publish added content

2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@ def read(filename):
return open(os.path.join(os.path.join(os.path.dirname(__file__), filename))).read()

setup(name="zkaffold",
version="0.0.10",
version="0.0.11dev0",
description="Build out demonstration content for plone",
long_description=read('README.rst'),
author="Pat Smith",
Expand Down
2 changes: 1 addition & 1 deletion zkaffold/contentimporter.py
Expand Up @@ -116,7 +116,7 @@ def _missingFields(self, context, portal_type, given_fields):
no_usable_default = lambda f:f.type!='boolean' and not bool(f.default)
required_fields = [f.getName() for f in type['schema'].filterFields(not_reference, no_usable_default, required=True)]

missing_fields = [f for f in required_fields if f not in given_fields]
missing_fields = [f for f in required_fields if f not in given_fields and f != 'id']
return missing_fields

def publish(self, obj, transition='publish', state='published'):
Expand Down

0 comments on commit f2f4681

Please sign in to comment.