Skip to content

Commit

Permalink
[#1531] change dataset_group to group
Browse files Browse the repository at this point in the history
  • Loading branch information
kindly committed Jan 3, 2012
1 parent b6971f9 commit 8457a34
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ckan/migration/versions/047_rename_package_group_member.py
Expand Up @@ -78,8 +78,8 @@ def upgrade(migrate_engine):
update member set table_name = 'package', capacity = 'member';
update member_revision set table_name = 'package', capacity = 'member';
update "group" set type = 'dataset_group';
update group_revision set type = 'dataset_group';
update "group" set type = 'group';
update group_revision set type = 'group';
ALTER TABLE "member"
Expand Down
2 changes: 1 addition & 1 deletion ckan/model/group.py
Expand Up @@ -57,7 +57,7 @@ def related_packages(self):
class Group(vdm.sqlalchemy.RevisionedObjectMixin,
vdm.sqlalchemy.StatefulObjectMixin,
DomainObject):
def __init__(self, name=u'', title=u'', description=u'', type=u'dataset_group'):
def __init__(self, name=u'', title=u'', description=u'', type=u'group'):
self.name = name
self.title = title
self.description = description
Expand Down
6 changes: 3 additions & 3 deletions ckan/tests/lib/test_dictization.py
Expand Up @@ -37,12 +37,12 @@ def setup_class(cls):
{'key': u'original media', 'state': u'active', 'value': u'"book"'}],
'groups': [{'description': u'These are books that David likes.',
'name': u'david',
'type': u'dataset_group',
'type': u'group',
'state': u'active',
'title': u"Dave's books"},
{'description': u'Roger likes these books.',
'name': u'roger',
'type': u'dataset_group',
'type': u'group',
'state': u'active',
'title': u"Roger's books"}],
'isopen': True,
Expand Down Expand Up @@ -903,7 +903,7 @@ def test_16_group_dictized(self):
'version': u'0.7a'}],
'state': u'active',
'title': u'help',
'type': u'dataset_group'}
'type': u'group'}

expected['packages'] = sorted(expected['packages'], key=lambda x: x['name'])

Expand Down

0 comments on commit 8457a34

Please sign in to comment.