diff --git a/jsc_custom/handler/share_handler.py b/jsc_custom/handler/share_handler.py index a5912ed432ecedecd48ca2521236a6c38712d810..e86129ce5b0e2a4bd88660e261476ee3e4fbb38c 100644 --- a/jsc_custom/handler/share_handler.py +++ b/jsc_custom/handler/share_handler.py @@ -166,17 +166,20 @@ class R2DHandler(SpawnHandler): if len(arguments_dict_lower.get("system", [])) > 0: system = arguments_dict_lower.get("system")[0].decode("utf-8") elif len(auth_state.get("outpost_flavors", {}).keys()) > 0: - system = list(auth_state.get("outpost_flavors", {}).keys())[0] - else: try: custom_config = get_custom_config() - if "deNBI-Cloud" in custom_config.get("systems", {}).keys(): + if ( + "deNBI-Cloud" in custom_config.get("systems", {}).keys() + and "deNBI-Cloud" in auth_state.get("outpost_flavors", {}).keys() + ): system = "deNBI-Cloud" else: - system = "JSC-Cloud" + system = list(auth_state.get("outpost_flavors", {}).keys())[0] except: self.log.exception("Could not check for systems") system = "JSC-Cloud" + else: + system = "JSC-Cloud" user_options["system"] = system # Get Flavor