mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-09 17:41:49 -05:00
Update how we repopulate the /host/:id/smart_inventories data
This commit is contained in:
@@ -58,7 +58,7 @@ import ansiconv
|
||||
from social.backends.utils import load_backends
|
||||
|
||||
# AWX
|
||||
from awx.main.tasks import send_notifications, update_host_smart_inventory_memberships
|
||||
from awx.main.tasks import send_notifications
|
||||
from awx.main.access import get_user_queryset
|
||||
from awx.main.ha import is_ha_environment
|
||||
from awx.api.authentication import TaskAuthentication, TokenGetAuthentication
|
||||
@@ -2005,14 +2005,6 @@ class HostSmartInventoriesList(SubListAPIView):
|
||||
relationship = 'smart_inventories'
|
||||
new_in_320 = True
|
||||
|
||||
def list(self, *args, **kwargs):
|
||||
try:
|
||||
if settings.AWX_REBUILD_SMART_MEMBERSHIP:
|
||||
update_host_smart_inventory_memberships.delay()
|
||||
return super(HostSmartInventoriesList, self).list(*args, **kwargs)
|
||||
except Exception as e:
|
||||
return Response(dict(error=_(unicode(e))), status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
|
||||
class HostActivityStreamList(ActivityStreamEnforcementMixin, SubListAPIView):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user