Skip to content

Commit

Permalink
Corrected DefaultFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrarum committed Mar 28, 2018
1 parent 55fe1a4 commit 0ba7754
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/pkan/dcatapde/api/dcat_collection_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


# Data Cleaning Methods
def clean_collection_catalog(**data):
def clean_collection(**data):
"""Clean CollectionCatalogs."""
test_catalog = DCATCollectionCatalog()

Expand All @@ -28,7 +28,7 @@ def clean_collection_catalog(**data):
# Add Methods
def add_collection_catalog(context, **data):
"""Add a new CollectionCatalog."""
data, errors = clean_collection_catalog(**data)
data, errors = clean_collection(**data)

catalog = create(container=context,
type=CT_DCAT_COLLECTION_CATALOG,
Expand Down
6 changes: 3 additions & 3 deletions src/pkan/dcatapde/content/dcat_collectioncatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ class DCATCollectionCatalogDefaultFactory(DexterityFactory):
"""Custom DX factory for DCATCatalog."""

def __init__(self):
self.portal_type = constants.CT_DCAT_CATALOG
self.portal_type = constants.CT_DCAT_COLLECTION_CATALOG

def __call__(self, *args, **kw):
from pkan.dcatapde.api.dcat_catalog import clean_catalog
from pkan.dcatapde.api.dcat_collection_catalog import clean_collection

data, errors = clean_catalog(**kw)
data, errors = clean_collection(**kw)

return super(
DCATCollectionCatalogDefaultFactory,
Expand Down

0 comments on commit 0ba7754

Please sign in to comment.