Пример #1
0
 def validate_import(self, doc=None, username_mapping=None, **kw):
     require_access(c.project, 'admin')
     if username_mapping is None: username_mapping = {}
     try:
         doc = json.loads(doc)
         warnings, doc = import_support.validate_import(doc, username_mapping)
         return dict(warnings=warnings, errors=[])
     except Exception, e:
         raise
         log.exception(e)
         return dict(status=False, errors=[repr(e)])
Пример #2
0
 def validate_import(self, doc=None, username_mapping=None, **kw):
     require_access(c.project, 'admin')
     if username_mapping is None: username_mapping = {}
     try:
         doc = json.loads(doc)
         warnings, doc = import_support.validate_import(
             doc, username_mapping)
         return dict(warnings=warnings, errors=[])
     except Exception, e:
         raise
         log.exception(e)
         return dict(status=False, errors=[repr(e)])