Skip to content

Commit

Permalink
Merge branch 'remove-webstore-fields'
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Feb 9, 2016
2 parents dda8e7b + 7fafb2e commit 6d331c8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 27 deletions.
4 changes: 0 additions & 4 deletions ckan/logic/action/create.py
Expand Up @@ -255,8 +255,6 @@ def resource_create(context, data_dict):
:type mimetype: string
:param mimetype_inner: (optional)
:type mimetype_inner: string
:param webstore_url: (optional)
:type webstore_url: string
:param cache_url: (optional)
:type cache_url: string
:param size: (optional)
Expand All @@ -267,8 +265,6 @@ def resource_create(context, data_dict):
:type last_modified: iso date string
:param cache_last_updated: (optional)
:type cache_last_updated: iso date string
:param webstore_last_updated: (optional)
:type webstore_last_updated: iso date string
:param upload: (optional)
:type upload: FieldStorage (optional) needs multipart/form-data
Expand Down
5 changes: 0 additions & 5 deletions ckan/logic/schema.py
Expand Up @@ -90,13 +90,11 @@ def default_resource_schema():
'url_type': [ignore_missing, unicode],
'mimetype': [ignore_missing, unicode],
'mimetype_inner': [ignore_missing, unicode],
'webstore_url': [ignore_missing, unicode],
'cache_url': [ignore_missing, unicode],
'size': [ignore_missing, int_validator],
'created': [ignore_missing, isodate],
'last_modified': [ignore_missing, isodate],
'cache_last_updated': [ignore_missing, isodate],
'webstore_last_updated': [ignore_missing, isodate],
'tracking_summary': [ignore_missing],
'datastore_active': [ignore_missing],
'__extras': [ignore_missing, extras_unicode_convert, keep_extras],
Expand Down Expand Up @@ -215,18 +213,15 @@ def default_show_package_schema():
'position': [not_empty],
'last_modified': [ckan.lib.navl.validators.ignore_missing],
'cache_last_updated': [ckan.lib.navl.validators.ignore_missing],
'webstore_last_updated': [ckan.lib.navl.validators.ignore_missing],
'revision_id': [],
'package_id': [],
'cache_last_updated': [],
'webstore_last_updated': [],
'size': [],
'state': [],
'last_modified': [],
'mimetype': [],
'cache_url': [],
'name': [],
'webstore_url': [],
'mimetype_inner': [],
'resource_type': [],
'url_type': [],
Expand Down
5 changes: 1 addition & 4 deletions ckan/model/resource.py
Expand Up @@ -26,8 +26,7 @@
CORE_RESOURCE_COLUMNS = ['url', 'format', 'description', 'hash', 'name',
'resource_type', 'mimetype', 'mimetype_inner',
'size', 'created', 'last_modified', 'cache_url',
'cache_last_updated', 'webstore_url',
'webstore_last_updated', 'url_type']
'cache_last_updated', 'url_type']

##formally package_resource
resource_table = Table(
Expand All @@ -51,8 +50,6 @@
Column('last_modified', types.DateTime),
Column('cache_url', types.UnicodeText),
Column('cache_last_updated', types.DateTime),
Column('webstore_url', types.UnicodeText),
Column('webstore_last_updated', types.DateTime),
Column('url_type', types.UnicodeText),
Column('extras', _types.JsonDictType),
)
Expand Down
14 changes: 3 additions & 11 deletions ckan/tests/legacy/lib/test_dictization.py
Expand Up @@ -97,9 +97,7 @@ def setup_class(cls):
u'size_extra': u'123',
u'url_type': None,
u'state': u'active',
u'url': u'http://datahub.io/download/x=1&y=2',
u'webstore_last_updated': None,
u'webstore_url': None},
u'url': u'http://datahub.io/download/x=1&y=2',},
{u'alt_url': u'alt345',
u'cache_last_updated': None,
u'cache_url': None,
Expand All @@ -116,9 +114,7 @@ def setup_class(cls):
u'size': None,
u'size_extra': u'345',
u'state': u'active',
u'url': u'http://datahub.io/index.json',
u'webstore_last_updated': None,
u'webstore_url': None}],
u'url': u'http://datahub.io/index.json'}],
u'state': u'active',
'tags': [{u'name': u'Flexible \u30a1',
'display_name': u'Flexible \u30a1',
Expand Down Expand Up @@ -437,9 +433,7 @@ def test_13_get_package_in_past(self):
u'url_type': None,
u'size': None,
u'state': u'active',
u'url': u'http://newurl',
u'webstore_last_updated': None,
u'webstore_url': None})
u'url': u'http://newurl'})
third_dictized['num_resources'] = third_dictized['num_resources'] + 1

third_dictized['tags'].insert(1, {'name': u'newnew_tag', 'display_name': u'newnew_tag', 'state': 'active'})
Expand Down Expand Up @@ -471,11 +465,9 @@ def test_14_resource_no_id(self):
'format': u'plain text',
'url': u'http://test_new',
'cache_url': None,
'webstore_url': None,
'cache_last_updated': None,
'state': u'active',
'mimetype_inner': None,
'webstore_last_updated': None,
'url_type': None,
'last_modified': None,
'position': 0,
Expand Down
4 changes: 1 addition & 3 deletions ckan/tests/lib/dictization/test_model_dictize.py
Expand Up @@ -416,9 +416,7 @@ def test_package_dictize_resource(self):
u'size': None,
u'state': u'active',
u'url': u'http://link.to.some.data',
u'url_type': None,
u'webstore_last_updated': None,
u'webstore_url': None
u'url_type': None
}
self.assert_equals_expected(expected_dict, result['resources'][0])

Expand Down

0 comments on commit 6d331c8

Please sign in to comment.