From 31dac7029a5fcccc02da2184b9e214d92ce658e6 Mon Sep 17 00:00:00 2001 From: David Raznick Date: Wed, 28 Sep 2011 14:27:28 +0100 Subject: [PATCH] fix to make import stage work on its own --- ckanext/harvest/commands/harvester.py | 1 + ckanext/harvest/lib/__init__.py | 1 + 2 files changed, 2 insertions(+) diff --git a/ckanext/harvest/commands/harvester.py b/ckanext/harvest/commands/harvester.py index e725a9e..1c9c673 100644 --- a/ckanext/harvest/commands/harvester.py +++ b/ckanext/harvest/commands/harvester.py @@ -93,6 +93,7 @@ class Harvester(CkanCommand): elif cmd == 'initdb': self.initdb() elif cmd == 'import': + self.initdb() self.import_stage() elif cmd == 'job-all': self.create_harvest_job_all() diff --git a/ckanext/harvest/lib/__init__.py b/ckanext/harvest/lib/__init__.py index 05bda9a..a5db03f 100644 --- a/ckanext/harvest/lib/__init__.py +++ b/ckanext/harvest/lib/__init__.py @@ -374,6 +374,7 @@ def import_last_objects(source_id=None): harvester.force_import = True harvester.import_stage(obj) last_obj_guid = obj.guid + return imported_objects