Skip to content

Commit

Permalink
Cope with bad revisions being created. To find the problem at source …
Browse files Browse the repository at this point in the history
…too, but in the mean-time cope.
  • Loading branch information
David Read authored and rossjones committed Jul 16, 2012
1 parent 08f1461 commit c69b08a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ckan/controllers/revision.py
Expand Up @@ -65,6 +65,11 @@ def list(self):
revision_changes[model.ResourceGroup]
package_extra_revisions = revision_changes[model.PackageExtra]
for package in revision.packages:
if not package:
# package is None sometimes - I don't know why,
# but in the meantime while that is fixed,
# avoid an exception here
continue
number = len(package.all_revisions)
package_revision = None
count = 0
Expand Down

0 comments on commit c69b08a

Please sign in to comment.