Skip to content

Commit

Permalink
Move task call to response_add
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvarner committed Jan 23, 2024
1 parent 3934efb commit e5d6a6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions readux_ingest_ecds/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ def save_model(self, request, obj, form, change):
obj.creator = request.user
obj.process()
super().save_model(request, obj, form, change)

def response_add(self, request, obj, post_url_continue=None):
obj.refresh_from_db()
# if os.environ["DJANGO_ENV"] != 'test': # pragma: no cover
# local_ingest_task_ecds.apply_async(args=[obj.id])
# else:
local_ingest_task_ecds(obj.id)

def response_add(self, request, obj, post_url_continue=None):
obj.refresh_from_db()
LOGGER.info(f'INGEST: Local ingest - {obj.id} - added for {obj.manifest.pid}')
return redirect('/admin/manifests/manifest/{m}/change/'.format(m=obj.manifest.pk))

Expand Down

0 comments on commit e5d6a6a

Please sign in to comment.