MCPcopy
hub / github.com/WebODM/WebODM / get

Method get

coreplugins/dronedb/api_views.py:256–268  ·  view source on GitHub ↗
(self, request, project_pk=None, pk=None)

Source from the content-addressed store, hash-verified

254
255class CheckUrlTaskView(TaskView):
256 def get(self, request, project_pk=None, pk=None):
257
258 # Assert that task exists
259 self.get_and_check_task(request, pk)
260
261 # Check if there is an imported url associated with the project and task
262 combined_id = "{}_{}".format(project_pk, pk)
263 data = get_current_plugin().get_global_data_store().get_json(combined_id, default = None)
264
265 if data == None or 'ddbWebUrl' not in data:
266 return Response({'ddbWebUrl': None}, status=status.HTTP_200_OK)
267 else:
268 return Response({'ddbUrl': data['ddbWebUrl']}, status=status.HTTP_200_OK)
269
270def get_status_key(task_id):
271 return '{}_ddb'.format(task_id)

Callers

nothing calls this directly

Calls 5

get_current_pluginFunction · 0.90
get_and_check_taskMethod · 0.80
get_jsonMethod · 0.80
get_global_data_storeMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected