Skip to content

Commit

Permalink
[#2006] Tidy up.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Read committed Nov 5, 2014
1 parent b985a53 commit d23523c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion ckan/lib/dictization/__init__.py
Expand Up @@ -72,7 +72,7 @@ def obj_list_dictize(obj_list, context, sort_key=lambda x:x):
dictized = table_dictize(obj, context, capacity=capacity)
else:
dictized = table_dictize(obj, context)
if active and obj.state not in ('active'):
if active and obj.state != 'active':
continue
result_list.append(dictized)

Expand Down
3 changes: 0 additions & 3 deletions ckan/tests/models/test_package.py
Expand Up @@ -47,7 +47,6 @@ def test_basic_revisioning(self):
assert len(package.all_revisions) == 1
assert package.all_revisions[0].revision_id == revision_id
assert package.all_revisions[0].revision_timestamp == timestamp
assert package.all_revisions[0].expired_id is None

# change it
rev = model.repo.new_revision()
Expand All @@ -61,11 +60,9 @@ def test_basic_revisioning(self):
assert len(package.all_revisions) == 2
assert package.all_revisions[0].revision_id == revision_id2
assert package.all_revisions[0].revision_timestamp == timestamp2
assert package.all_revisions[0].expired_id is None

assert package.all_revisions[1].revision_id == revision_id
assert package.all_revisions[1].revision_timestamp == timestamp
assert package.all_revisions[1].expired_id == revision_id2

def test_create_package(self):
package = model.Package.by_name(self.name)
Expand Down

0 comments on commit d23523c

Please sign in to comment.