Displaying differences for changeset
 
display as  

services.py

@@ -2669,10 +2669,11 @@
         self.assessments = []
         self.load_registry()
 
-#     def GET(self):
-#         """Load all 'tracking sheet' options for UI to pick from"""
-#         import pdb; pdb.set_trace()
-#         return er2_api.respond(self)
+    def GET(self):
+        """Load all 'tracking sheet' options for UI to pick from"""
+        import pdb; pdb.set_trace()
+        # I think this is just the dictionary keys in the registry?
+        return self.registry.keys()
 
     def get_selected_registry(self, selected_tracking_sheet):
         """Fetch a particular tracking sheet"""

urls.py

@@ -23,6 +23,7 @@
     django.conf.urls.url(r"api/v1/download_assessment/$", views.download_assessment),
     django.conf.urls.url(r"api/v1/download_rationale/$", views.download_rationale_only),
     django.conf.urls.url(r"api/v1/run_rcontrol/$", views.run_rcontrol),
+    django.conf.urls.url(r"api/v1/load_assessment_registry/$", views.load_assessment_registry),
     django.conf.urls.url(r"api/v1/get_selected_tracking_sheet/$", views.get_selected_tracking_sheet),
     django.conf.urls.url(r"api/v1/add_to_tracking_sheet/$", views.add_to_tracking_sheet),
     django.conf.urls.url(r"api/v1/remove_from_tracking_sheet/$",views.remove_from_tracking_sheet,),

views.py

@@ -316,6 +316,12 @@
 
 @csrf_exempt
 @return_with_exception
+def load_assessment_registry(request):
+    return svcs.Tracking(request=request).process()
+
+
+@csrf_exempt
+@return_with_exception
 def get_selected_tracking_sheet(request):
     request_state = er2_api.load_json(request.body)
     selectedTrackingSheet = request_state["selectedTrackingSheet"]