added request for metadata calls to be able to handle errors in messages
[myslice.git] / manifold / metadata.py
index 420821c..40a88ff 100644 (file)
@@ -4,6 +4,8 @@ import os.path
 from manifold.manifoldresult import ManifoldResult
 from manifold.manifoldapi import ManifoldAPI
 
+from django.contrib                     import messages
+
 debug=False
 debug=True
 
@@ -17,7 +19,7 @@ class MetaData:
         self.auth=auth
         self.hash_by_object={}
 
-    def fetch (self):
+    def fetch (self, request):
         offline_filename="%s/../offline-metadata.json"%os.path.dirname(__file__)
         if work_offline:
             try:
@@ -34,7 +36,8 @@ class MetaData:
         #          'column.resource_type', 'column.value_type',
         #          'column.allowed_values', 'column.platforms.platform',
         #          'column.platforms.platform_url']
-        result = manifold_api.Get({
+        result = manifold_api.forward({
+            'action': 'get',
             'object': 'local:object', # proposed to replace metadata:table
             'fields':     fields 
         })